Mark, Thanks, you're right it is the dependencies that caught me out. I compiled against the velocity-dep-1.4.jar which contains the missing classes and it's working fine now.
Steve -----Original Message----- From: Mark Lybarger [mailto:[EMAIL PROTECTED] Sent: 08 October 2004 20:16 To: Velocity Users List Subject: RE: Example for Newbie Steve, I think velocity requires ORO, Logkit and Commons Collections libraries. Are these also in your web-inf/lib folder? or did you use the jar-dep target to build a complete velocity jar? > -----Original Message----- > From: Steve O'Hara [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 07, 2004 2:10 PM > To: Velocity Users List > Subject: Example for Newbie > > > > Apologies if this is too stupid for a response but...... > I'm new to Velocity and have just tried the servlet example > which I can't > get to work. > I'm using Tomcat 4.x.x and have created the webapp directory > as described in > the readme:- > > -> velexample > sample.vm > -> WEB-INF > -> classes > SampleServlet.class > -> lib > velocity-1.4.jar > > I've created the context in Tomcat:- > > <Context path="/velexample" > docBase="E:\Useful > Stuff\Java\Velocity\velocity-1.4\examples\servlet_example1\velexample" > debug="1" reloadable="false"> </Context> > > When I try and run the servlet with > http://localhost:8080/velexample/servlet/SampleServlet > I get the following error:- > > java.lang.NoClassDefFoundError > at org.apache.velocity.app.Velocity.init(Velocity.java:106) > at > org.apache.velocity.servlet.VelocityServlet.initVelocity(Veloc > ityServlet.jav > a:193) > at > org.apache.velocity.servlet.VelocityServlet.init(VelocityServl > et.java:162) > at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardW > rapper.java:91 > 8) > at > org.apache.catalina.core.StandardWrapper.allocate(StandardWrap > per.java:655) > at > org.apache.catalina.servlets.InvokerServlet.serveRequest(Invok > erServlet.java > :415) > .................. > > Now I'm assuming that it can't find a class file or jar, but > which one. The > class compiled ok using a simple javac command (not using Ant). > > I realise this is pretty basic so apologies....... > > Steve > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
