velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markos Charatzas <x...@forthnet.gr>
Subject Using a standalone app in a servlet environment
Date Mon, 12 Jul 2004 12:46:32 GMT
Hi there,

I'm into the following despair.

I have a standalone application with the following directory structure

/classes
/resources/templates/


a velocity.properties file resides in the /resources directory with the 
following:

resource.loader = OpenseasService

OpenseasService.loader.description = "Openseas Service Resource Loader"
OpenseasService.resource.loader.class = 
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader


a simple class that has a template attached to it is using the path 
"/resources/templates/test.vm" for example

I pack the application into a jar file retaining the directory structure 
mentioned above (of course classes dir is removed)
and deploy it in the WEB-INF\lib of a webapp.

However the resource loader is unable to locate the template in 
"/resources/templates/test.vm" within that jar.
I assume that's since the ClasspathLoader is different since Tomcat is 
the container now.

Is there a workaround in this? :(

Thx in advance,
Markos Charatzas

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message