velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr. <ge...@optonline.net>
Subject Re: Velocity configuration with servlets
Date Tue, 21 Oct 2003 00:26:01 GMT

On Wednesday, October 15, 2003, at 01:19 PM, Barbara Baughman wrote:

> 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
> http://www.utdallas.edu/~baughman/velocity2.html
>
> After you get it working once, you'll never want to use anything else.
>

Well, Jetty ain't bad either :)

> Barbara Baughman
> X2157
>
> 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
>> "velocity.properties" 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: velocity-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message