You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Stewart, Robbie (Contractor)" <Ro...@dsto.defence.gov.au> on 2001/08/02 05:18:26 UTC

RE: war

A couple of gotchas when making the war.
The template needs to be at the root of the war file
as the servlet when initialising it's properties set's
the resource loader path as "/". Also I'm not sure
you can just archive up any old structure and call it a
web archive. I think at the very least you would need something like:

$WEB_SERVER_HOME/webapps/sample1/WEB-INF

with a web.xml description in WEB-INF and a classes folder with
the SampleServlet class also residing in WEB-INF.
You would also need a lib folder in WEB-INF with the velocity
jar file in there.

Pretty sure if you build a web archive file which when loaded by the
web server expanded out to the above, the sample servlet should work
(well mine did when I tried it :)

HTH,


Robbe Stewart
Contractor
2.C.64



> -----Original Message-----
> From: Dan Bachelder [mailto:chowda@chowda.net]
> Sent: Tuesday, July 31, 2001 11:29 AM
> To: velocity-user@jakarta.apache.org
> Subject: war
> 
> 
> this is probably just me being an idiot.. but when I use 
> servlet_example 1
> in a blown out dir structure everything works great... when I 
> make a WAR out
> of that structure, velocity can't find sample.vm.. do I need to make a
> change in the source when I want to use a WAR? (i'm using tomcat 4 and
> velocity 1.1)
> 

Re: war

Posted by Dan Bachelder <ch...@chowda.net>.
Thats my problem I'm sure... I was screwing around with the template path..
it worked when it was blown out... but tomcat must not like the template
being in a subdir... I'll try it tonight, thanks.

----- Original Message -----
From: "Stewart, Robbie (Contractor)" <Ro...@dsto.defence.gov.au>
To: <ve...@jakarta.apache.org>
Sent: Wednesday, August 01, 2001 11:18 PM
Subject: RE: war


> A couple of gotchas when making the war.
> The template needs to be at the root of the war file
> as the servlet when initialising it's properties set's
> the resource loader path as "/". Also I'm not sure
> you can just archive up any old structure and call it a
> web archive. I think at the very least you would need something like:
>
> $WEB_SERVER_HOME/webapps/sample1/WEB-INF
>
> with a web.xml description in WEB-INF and a classes folder with
> the SampleServlet class also residing in WEB-INF.
> You would also need a lib folder in WEB-INF with the velocity
> jar file in there.
>
> Pretty sure if you build a web archive file which when loaded by the
> web server expanded out to the above, the sample servlet should work
> (well mine did when I tried it :)
>
> HTH,
>
>
> Robbe Stewart
> Contractor
> 2.C.64
>
>
>
> > -----Original Message-----
> > From: Dan Bachelder [mailto:chowda@chowda.net]
> > Sent: Tuesday, July 31, 2001 11:29 AM
> > To: velocity-user@jakarta.apache.org
> > Subject: war
> >
> >
> > this is probably just me being an idiot.. but when I use
> > servlet_example 1
> > in a blown out dir structure everything works great... when I
> > make a WAR out
> > of that structure, velocity can't find sample.vm.. do I need to make a
> > change in the source when I want to use a WAR? (i'm using tomcat 4 and
> > velocity 1.1)
> >
>