Here's a question for VVS users - is webapp resource loading on by default?

I just don't get how the FileResourceLoader knows to go from the base of the
web template.  I'm thinking that it's not being used at all.


WILL

----- Original Message ----- From: <[EMAIL PROTECTED]>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Thursday, April 14, 2005 1:58 PM
Subject: Re: Problem with decimal in most recent snapshot




Something I am just noticing. When I have commented out webapp.resource.loader.class, the general templating works for web browsing. It works off of the base web root.

When I put back in
     webapp.resource.loader.path = /WEB-INF/templates
Velocity seems to disregard the base web root for all processing and I get
the ResourceNotFoundException found at the bottom.

This seems to work with Will's idea on full path, but shouldn't it still
use the file.resource.loader.path for web browsing?  As soon as I take out
the webapp.resource.loader.path it goes back to using path relative to the
web root.

I always need to use a path relative to the web root in both cases if
possible.  I am going to mess around with paths now and see if I put in
the full path it works.

JohnE



org.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource '/WEB-INF/templates/pub/common/tiles/defaultTemplate.vm'
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:463)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:346)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:835)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:817)
at
org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:504)
at
org.apache.velocity.tools.view.servlet.VelocityViewServlet.getTemplate(Unknown
Source)
at
org.apache.velocity.tools.view.servlet.VelocityViewServlet.handleRequest(Unknown
Source)
at
org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(Unknown
Source)
at
org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(Unknown
Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
at
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:237)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)





---------------------------------------------------------------------
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