velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ChadDavis <>
Subject caching with multiple resource loaders
Date Tue, 17 Feb 2009 00:16:15 GMT
I've got an app where I use a file resource loader followed by a
classpath resource loader.  I want the templates in the file location
to override the templates on the classpath.  This works partially.  If
a template with the same name is in both locations, it definitely
picks up the one in the file system.  If I remove the filesystem
template, during run time, the template on the classpath is then
found.  So far, so good.  If I then, however, try to put the template
back in the file system location, it is NOT picked up.

Note, this is all during run time.  If I restart my app ( a web
application -- not using the velocity servlet ), the filesystem
template is again picked up.

Here is my configuration:

 resource.loader=file, class

# File resource loader information
file.resource.loader.description=Velocity File Resource Loader


# Class resource loader information
class.resource.loader.description=Velocity Classpath Resource Loader

Other notes:

If I turn the caching off on the classpath resource loader ( i.e.
change only the class.resource.loader.cache to false in the above
config ), everything works at runtime.

What am I doing wrong?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message