Jon Stevens wrote:
> 
> on 12/18/2000 10:45 AM, "Diethelm Guallar, Gonzalo"
> <[EMAIL PROTECTED]> wrote:
> 
> > The handling of relative files in TR.props is not
> > consistent. If you do
> >
> > include = foo
> >
> > The file foo is searched for on the same directory where
> > the including file (TR.props) is located. However, when
> > you say
> >
> > services.TurbineVelocityService.properties=/WEB-INF/conf/velocity.properties
> >
> > the file /WEB-INF/conf/velocity.properties is searched
> > for from the ServletContext directory (webapp directory).
> > Do we really want to have these two cases as different?
> > I can see why it makes sense for include to behave the
> > way it does (it is similar to what #include "foo" would
> > do on C code), but perhaps it should be made to behave
> > like V.props does. Or maybe this is not possible, because
> > at the point include is processed there is not enough info
> > to determine a correct ServletContext object?
> 
> Yes, this should be fixed throughout Turbine I think.
> 
> First try the path and then try the ServletContext path. Note that it will
> tie everything to Turbine.java though so we might want to switch to using
> Reflection to attempt to do that.
> 

An alternate way to provide consistent file and URLs definition
in TR.p is to let the Resources service itself resolve the relative
paths and URL to absolute references at runtime, so that you can
write:

include =${conf.dir}/myproperties
properties=${webapp.dir}/WEB-INF/conf/myproperties
etc.

This a lot easier to maintain than fixing every possible path uses in the
Turbine framework.

I have a resources service implementation doing this in Jetspeed (but
it depends on the TurbineResources code Rafal is currently integrating
in Turbine).

--
Rapha�l Luta - [EMAIL PROTECTED]
Vivendi Universal Networks - Services Manager / Paris


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to