velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Baughman <>
Subject Re: Velocity configuration with servlets
Date Wed, 15 Oct 2003 17:19:22 GMT
Without the steps to specifically set the file.resource.loader.path to
be relative to the web application, Velocity always looks for the
templates relative to the directory where the program is running.  For
tomcat, that's relative to $TOMCAT_HOME/bin.

The VelocityViewServlet in the Velocity Tools project can be a help in
using Velocity within the context of servlet development.

For another perspective, I have my personal notes on setting up
Velocity with tomcat at

After you get it working once, you'll never want to use anything else.

Barbara Baughman

On Wed, 15 Oct 2003, Ross Tailby wrote:

> I am currently having a problem displaying output on a web browser when
> using Velocity with Servlets. The tomcat server and directory structure seem
> to be set up ok as standard Servlets will appear fine. However, when a
> Servlet that uses a velocity template is used, no output is displayed (i.e.
> blank IE screen) and a
> org.apache.velocity.exception.ResourceNotFoundException appears in the
> tomcat command window (stating that the resource velocity template cannot be
> found).
> I realise that this probably means that the template is not located by the
> program but I've tried specifying the path in the servlet, pasting the
> template in at every level in the directory path, and defining a
> "" config file (which didn't seem to do very much..) all
> to no avail. If anyone has some advice on how to structure the directory or
> if any extra settings need to be changed, I'd be very grateful to hear about
> it.
> Thanks.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message