velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Steichen" <>
Subject Finding Templates in Jar files
Date Mon, 12 Nov 2001 22:05:11 GMT
This is undoubtably in the dumb question category, but I can't get the template files to load
from a jar file.

In, this works fine:
    file.resource.loader.path = /tools/jakarta-tomcat-3.2.2/webapps/w_e/web-inf/spt/templates
    (in which all templates reside in templates directory)

But this doesn't work at all: 
    jar.resource.loader.class = org.apache.velocity.runtime.resource.loader.JarResourceLoader
    jar.resource.loader.path = jar:file:/tools/jakarta-tomcat-3.2.2/w_e/web-inf/spt/templates/templates.jar
    (in which the templates.jar is also in the templates directory)

The velocity log merely says:
    [error] ResourceManager : unable to find resource 'vnfmain.html' in any resource loader.
    (where vnfmain.html is the first template used).  

I note the appended '\' above and am not sure why that's there, because the templates.jar
includes each of the templates without any path information included.  I am suspicious that
this appended backslash is related to my problem but don't know how to track it down easily.
This *should* be so simple - what am I doing wrong?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message