velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daren Reavis" <>
Subject ClasspathResourceLoader returning binary jar instead of template
Date Wed, 31 May 2006 18:16:49 GMT
I am developing a webapp under Tomcat 5 and Velocity.  I have a file that looks like this:

/resource.loader = class
class.resource.loader.description = Velocity Classpath Resource Loader
class.resource.loader.class =

Then, I included my templated in a jar in my WEB-INF/lib folder.  If I
do a unzip -t on the template.jar it looks like this:

/Archive:  template.jar
    testing: META-INF/                OK
    testing: META-INF/MANIFEST.MF     OK
    testing: generic.vm               OK
    testing: hello.vm                 OK
    testing: reporter.vm              OK
No errors detected in compressed data of template.jar.

Then, when I call the template from a servlet, I get a bunch of garbage
in the browser that looks like it is spitting out the binary of the jar
file.  It looks like this:


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