velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Cassidy" <>
Subject RE: Velocity Templates not found with Weblogic
Date Fri, 06 Dec 2002 22:07:01 GMT
This is your problem (from your log):
Wed Dec 04 12:24:53 PST 2002 [info] Default Properties File:

Weblogic isn't using the init param you set in web.xml, so not reading your
properties file, so not using the classpath loader. It is just using the
default properties set inside the jar file.

I've found (with WebLogic 6.1 on jdk 1.3.1 on Solaris 8) that the
instructions on the page don't always work, but sometimes do. WebLogic seems
sometimes to load up the classes without reading the init-param and so the
defaults get used. This means sometimes it will use the
in the jar files (org/apache/velocity/runtime/defaults/
as above.

I spent quite a lot of time on this. Two weblogic instances on the same
server with the same files under the application in question behaved two
different ways. In the end, I got so bored with this and similar issues that
nowadays I un-jar the two velocity.jar files into WEB-INF/classes and just
edit the default properties file named above to use a non-default template
directorty and so on. Then I write a single servlet extending velocity
servlet that just calls other classes to do the work, do the context
population and so on. This also gets around weblogic's (criminal)
requirement that you register every servlet in web.xml.

Then at deployment time you can jar the whole lot up into a war file and
weblogic is happy (it won't use exploded directories in production mode, you
have to use an archive).

Basically, I think all of this is weblogic's "fault", but if you are stuck
with it, you are stuck with it....

Hope this is some help,

-----Original Message-----
From: Kevin Avoy []
Sent: 04 December 2002 20:35
Subject: Velocity Templates not found with Weblogic

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message