ok. i'm having trouble following what you are saying, and i don't entirely feel like you trying the things i suggested exactly as i suggested them. so i'll just try to explain how the VelocityViewServlet resource loading does and doesn't do by default (i.e. with NO velocity.properties file specified in your web.xml whatsoever) and go from there.
the VVS doesn't use the FileResourceLoader by default. the VVS programmatically names its resource loader 'webapp', not 'file'. (e.g. resource.loader=webapp) the resource loader the VVS uses is the WebappLoader. (e.g. webapp.resource.loader.class=org.apache.velocity.tools.view.servlet.WebappLoader) the default path it uses is the webapp root. (e.g. webapp.resource.loader.path = /) this means to get the VVS to render a template, you must give it the full path from the root (e.g. /WEB-INF/templates/blah/blah/blah.vm) if you are using the most recent version of VelocityTools (1.2-dev), then the VVS does NOT use the Velocity singleton. it uses its own VelocityEngine. this means that if you have other parts of your application using the Velocity singleton, by default they will not be using the same configuration as the VVS. the singleton will use the standard Velocity defaults. this means the singleton uses the FileResourceLoader by default. the singleton does not use the WebappLoader. again, all of the above assumes that no custom velocity.properties files have been used for either the VVS or the Velocity singleton or any other VelocityEngine. now, if you would like to change the default path that the VelocityViewServlet loads templates from, make a velocity.properties file with *only* the line: webapp.resource.loader.path = /WEB-INF/templates and tell the VelocityViewServlet to use this via your web.xml file. adding properties that begin with 'file.resource.loader' is useless and will do nothing unless you also include the following "resource.loader=file" and "file.resource.loader.class=...". (if you want further explanation of this or to know how to use both the webapp and file loaders, RTFM :) again, if specified in your web.xml to go with the VVS, these settings will NOT affect the Velocity singleton. if other parts of your application use the singleton, you will certainly have to configure the singleton before using it. or you may ask the VelocityViewServlet for the VelocityEngine it is using and use that. make sense? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
