I haven't used VelocityServlet in a while, but as I recall you
needed to override the loadConfiguration method to properly configure
Velocity. By default, Velocity thinks the template from a file
resource loader will be relative to the directory of the program that
is calling Velocity. If you
Hello Michael,
In a servlet environment I would recommed that you use a
org.apache.velocity.tools.view.servlet.WebappLoader
with the loader.path specified as you have it already.
Have a good week :)
Markos
On Sunday 20 February 2005 19:57, Michael Salmon wrote:
Just a follow-up. I found that
beyond just the WebappLoader, the VelocityTools project is also home
to the VelocityViewServlet (designated successor of the deprecated
VelocityServlet), and several simple, drop-and-go example apps you can
play with until you get things working.
basically, if you're developing a webapp with
hi folks
my templates don't load from where I want. In particular here is what
I'm doing:
1. servlet extends VelocityServlet. and calls Velocity.init(). I dont
override loadConfiguration()
2. In my webapp, web.xml I define the specific properties file:
personally, i think Markos gave you the best answer already. you
should use the WebappLoader from the VelocityTools project. The
FileResourceLoader that Velocity uses by default is not very webapp
friendly. there are ways to get it working in web applications, but
in general they are not
hi folks
I'm trying to get my development environment setup on freebsd and
templates don't load from where I want. In particular here is what
I'm doing:
1. servlet extends VelocityServlet. and calls Velocity.init(). I dont
override loadConfiguration()
2. In my webapp, web.xml I define the
Just a follow-up. I found that from where I launch tomcat is where it
wants to load templates from. It seems clear to me my loader.path is not
being setup correctly. For now until I have a better solution I'll just
have to launch tomcat from my webapp root and put my templates there.. Still
I'd