You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Brian Topping <to...@digidemic.com> on 2002/05/28 11:08:43 UTC

Turbine on JBoss3.0

Hiyas,
 
I'm just getting started using Turbine on JBoss 3.0 with an eye toward deploying Jetspeed there.
 
The first problem I have run into is that Turbine always tries to open static files from the webapp directly from an exploded webapp directory.  This works okay under standalone Tomcat since it uses an instantiation of FileDirContext, but when embedded in JBoss, Tomcat uses a WARDirContext.  If I have my head screwed on straight, this means reliance on ServletContext.getRealPath() is incorrect except for portability with Servlet specs prior to 2.1.
 
Is there any reason that these calls shouldn't be updated to Servlet.getResource()?  I presume the calls to getRealPath are in there from the early days of Turbine.  I'll go ahead and generate the diffs if this is reasonable and someone wants to merge them when I am done.  If not, maybe someone could clue me in on another path around the problem of loading resources out of the WAR file...
 
Thanks,
 
Brian

_________________________________________________________ 
If you have some ice cream, I will give it to you. 
If you have no ice cream, I will take it away from you. 
         - Ice Cream Koan

 

Re: Turbine on JBoss3.0

Posted by Daniel Rall <dl...@finemaltcoding.com>.
This is definitely a change that should be made.  I've been wanting to
look into it myself for quite a while, but it has never made it far
enough up the list of priorities for me.

James Taylor <jt...@4lane.com> writes:

> Sounds interesting, however note that 'getRealPath("")' is used to
> determine the application root, which is then used in lots of places
> (including everywhere that calls Turbine.getRealPath(...)) so getting
> turbine to work from a WAR may require more than just that change. 
>
> However I'm amicable to making the change, does anybody have a good
> reason not to? Obviously this would mean certain defaults (logging to
> the application root) would not work when using a WAR.
>
> -- jt
>
> On Tue, 2002-05-28 at 05:08, Brian Topping wrote:
> > Hiyas,
>>  
>> I'm just getting started using Turbine on JBoss 3.0 with an eye toward deploying Jetspeed there.
>>  
>> The first problem I have run into is that Turbine always tries to open static files from the webapp directly from an exploded webapp directory.  This works okay under standalone Tomcat since it uses an instantiation of FileDirContext, but when embedded in JBoss, Tomcat uses a WARDirContext.  If I have my head screwed on straight, this means reliance on ServletContext.getRealPath() is incorrect except for portability with Servlet specs prior to 2.1.
>>  
>> Is there any reason that these calls shouldn't be updated to Servlet.getResource()?  I presume the calls to getRealPath are in there from the early days of Turbine.  I'll go ahead and generate the diffs if this is reasonable and someone wants to merge them when I am done.  If not, maybe someone could clue me in on another path around the problem of loading resources out of the WAR file...

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Turbine on JBoss3.0

Posted by Jason van Zyl <jv...@zenplex.com>.
On Tue, 2002-05-28 at 07:28, James Taylor wrote:
> Sounds interesting, however note that 'getRealPath("")' is used to
> determine the application root, which is then used in lots of places
> (including everywhere that calls Turbine.getRealPath(...)) so getting
> turbine to work from a WAR may require more than just that change. 
> 
> However I'm amicable to making the change, does anybody have a good
> reason not to? Obviously this would mean certain defaults (logging to
> the application root) would not work when using a WAR.
> 

Where does logging typically occur when webapps are deployed in-WAR?

> -- jt
> 
> On Tue, 2002-05-28 at 05:08, Brian Topping wrote:
> > Hiyas,
> >  
> > I'm just getting started using Turbine on JBoss 3.0 with an eye toward deploying Jetspeed there.
> >  
> > The first problem I have run into is that Turbine always tries to open static files from the webapp directly from an exploded webapp directory.  This works okay under standalone Tomcat since it uses an instantiation of FileDirContext, but when embedded in JBoss, Tomcat uses a WARDirContext.  If I have my head screwed on straight, this means reliance on ServletContext.getRealPath() is incorrect except for portability with Servlet specs prior to 2.1.
> >  
> > Is there any reason that these calls shouldn't be updated to Servlet.getResource()?  I presume the calls to getRealPath are in there from the early days of Turbine.  I'll go ahead and generate the diffs if this is reasonable and someone wants to merge them when I am done.  If not, maybe someone could clue me in on another path around the problem of loading resources out of the WAR file...
> >  
> > Thanks,
> >  
> > Brian
> > 
> > _________________________________________________________ 
> > If you have some ice cream, I will give it to you. 
> > If you have no ice cream, I will take it away from you. 
> >          - Ice Cream Koan
> > 
> >  
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Turbine on JBoss3.0

Posted by James Taylor <jt...@4lane.com>.
Sounds interesting, however note that 'getRealPath("")' is used to
determine the application root, which is then used in lots of places
(including everywhere that calls Turbine.getRealPath(...)) so getting
turbine to work from a WAR may require more than just that change. 

However I'm amicable to making the change, does anybody have a good
reason not to? Obviously this would mean certain defaults (logging to
the application root) would not work when using a WAR.

-- jt

On Tue, 2002-05-28 at 05:08, Brian Topping wrote:
> Hiyas,
>  
> I'm just getting started using Turbine on JBoss 3.0 with an eye toward deploying Jetspeed there.
>  
> The first problem I have run into is that Turbine always tries to open static files from the webapp directly from an exploded webapp directory.  This works okay under standalone Tomcat since it uses an instantiation of FileDirContext, but when embedded in JBoss, Tomcat uses a WARDirContext.  If I have my head screwed on straight, this means reliance on ServletContext.getRealPath() is incorrect except for portability with Servlet specs prior to 2.1.
>  
> Is there any reason that these calls shouldn't be updated to Servlet.getResource()?  I presume the calls to getRealPath are in there from the early days of Turbine.  I'll go ahead and generate the diffs if this is reasonable and someone wants to merge them when I am done.  If not, maybe someone could clue me in on another path around the problem of loading resources out of the WAR file...
>  
> Thanks,
>  
> Brian
> 
> _________________________________________________________ 
> If you have some ice cream, I will give it to you. 
> If you have no ice cream, I will take it away from you. 
>          - Ice Cream Koan
> 
>  



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>