velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daren Reavis" <drea...@ibnads.com>
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
velocity.properties file that looks like this:

[VELOCITY.PROPERTIES]
/resource.loader = class
class.resource.loader.description = Velocity Classpath Resource Loader
class.resource.loader.class =
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
/[/VELOCITY.PROPERTIES]

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:

[TEMPLATE.JAR]
/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.
/[/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:

[BINARY JUNK]
PK


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