Will wrote :

> That's a nice idea.  Consistent with the way other plugins (like custom
> directives) are handled as well, i.e. in the Velocity properties file.
>

I agree, but I'm not sure at all that an event cartridge is pertinent for relative 
resource loading.

After all, it is the duty of the Ressource Manager and Loaders to perform such a 
relative loading : the path "." should appear as a
search path among others in the velocity.properties file, like :

[...]
webapp.resource.loader.path = .
webapp.resource.loader.path = /WEB-INF/templates/
webapp.resource.loader.path = /
[...]

Also, unless you impose absolute pathes to always start with a "/" (which is not 
backward compatible), a relative path is always
ambiguous (it can be interpreted as absolute or relative). If "." is listed as a 
search path among others, the ambiguity is resolved
with the order of precedence given by the properties (according to the given the 
exemple : first check relative then absolute).

But to implement it this way, the ResourceLoader, as long as the ResourceManager, 
needs a reference to the InternalContextAdapter
(passed to it via new versions of the getContent / getTemplate methods). It can still 
be backward compatible considering that if the
ICA is not specified, no relative pathname resolution will occur.

I've implemented it this way. Should I share it ?

CloD



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to