next up previous contents
Next: First Java Servlet Up: Installing Previous: Testing Velocity

Testing Tomcat and Velocity

At this point you should have Tomcat up and running and you have compiled Velocity. Velocity is the velocity.jar file in the /bin directory of the Velocity install directory.

To build the examples go to the build directory and type:

   ant examples
Ant searches for the build.xml file and builds the Velocity examples.

If you look at the /examples directory you see the forumdemo example. Note: the README file can be outdated (it didn't use ANT yet in our case..).

Now to get the forumexample working just follow these steps:

  1. Copy the entire directory to your TOMCAT_HOME/webapps directory.
  2. Stop tomcat by using ./bin/shutdown.sh from your TOMCAT_HOME directory.
  3. Start tomcat by using ./bin/startup.sh from your TOMCAT_HOME directory.
Point your browser to http://127.0.0.1:8080/forumdemo/ if everything is ok the forumdemo should work! And Velocity works!

If you experience problems, make sure you've done everything as described above. Maybe things are updated, and new settings are needed, so read the documentation of the applications carefully!

If a template file can't be found make sure you started Tomcat in the right directory!

There should be a Velocity log file in the forumdemo directory: forumdemo_velocity.log, if it's not there, you probably started Tomcat in the wrong directory!


next up previous contents
Next: First Java Servlet Up: Installing Previous: Testing Velocity
Copyright © 2001, R.M. Morriën, H.P.A.M. Snoek, M.A.C. Bakker