This is highly bizarre.  Since this is the first i've heard of such a
problem with the VelocityViewServlet and you say you are extending it,
then i guess the question to ask is what does your extension do?

I'll try to think of other ways to discern where things are going
astray, but right now the only thing i can imagine is that your
subclass is doing something wrong.  IIRC, you are overloading
handleRequest(), which is by default responsible for calling
getTemplate(path) in the VelocityViewServlet and has no such
responsibility in the VelocityServlet.

Are you perchance trying to get the template yourself in your
overridden handleRequest()?  And if so, are you using the Velocity
singleton?  It should be using the same VelocityEngine that the VVS is
using.

On 12/13/06, Dave <[EMAIL PROTECTED]> wrote:
Hi again,

I have added a toolbox.xml - it is loaded OK - however the same symptoms occur,
which is, VelocityViewServlet ignores the ResourceLoaders defined in
velocity.properties and uses a simple FileResourceLoader instead.

The VelocityServlet instances that are in the same webapp all happily use the
ResourceLoaders from the velocity.properties to track down *.vm's, however even
though VelocityViewServlet says it is reading the custom velocity.properties it
only uses a FileResourceLoader with path "."

(I have verified this because to make the VVS work, I have to put the *.vm files
it wants in the tomcat bin directory when I run tomcat!! - that way the
FileResourceLoader being used by VVS finds the *.vm's... but I don't want to use
a FileResourceLoader, I need the *.vm's in the WAR!).

I can see the FileResourceLoader being loaded last in velocity.log (and I assume
clobbering my WebApp and Classpath resource loaders):

2006-12-14 09:03:45,941 - ResourceLoader instantiated:
org.apache.velocity.runtime.resource.loader.FileResourceLoader
2006-12-14 09:03:45,942 - FileResourceLoader : adding path '.'

I just don't know where it is coming from and how to kill it -
FileResourceLoader is no good when you want a transportable WAR for deploying!

Thankyou for your thoughts Velocitites ;-)

p.s. it would be I think better if the error message "2006-12-14 09:08:26,800 -
ResourceManager : unable to find resource 'aa0006.vm' in any resource loader."
specifically listed which ResourceLoaders it had actually tried....

Dave




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



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

Reply via email to