geirm 01/05/08 04:27:50
Modified: examples/servlet_example1 README.txt
Log:
Added basic instructions for how to use this sample with velocity.
Revision Changes Path
1.2 +47 -1 jakarta-velocity/examples/servlet_example1/README.txt
Index: README.txt
===================================================================
RCS file: /home/cvs/jakarta-velocity/examples/servlet_example1/README.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README.txt 2001/02/12 03:11:55 1.1
+++ README.txt 2001/05/08 11:27:36 1.2
@@ -16,4 +16,50 @@
your favorite servlet engine. To use this, you should have a basic understanding
how your servlet engine works, and how you deploy and access servlets to try this.
While we cannot supply this, we know of a good one :)
- http://jakarta.apache.org/tomcat
+ http://jakarta.apache.org/tomcat/
+
+
+Unfamiliar with Servlets?
+------------------------
+
+This documentation should be found elswhere, but putting here just in
+case.
+
+Using Velocity on the web is best done using Java Servlets. While we
+don't want to give a tutorial here, the basic idea is straightforward.
+
+1) Get a servlet engine. Tomcat, from the Jakarta project, is an
+excellent implementation. (In fact, it's the official reference
+implementation...)
+
+2) Install said servlet engine.
+
+3) Build this servlet example : build/build.sh examples
+
+4) Setup a webapp under tomcat :
+
+ - make a new 'webapp' : under tomcat's webapps directory,
+ make a new directory structure
+
+ webapp/
+ velexample
+ velexample/WEB-INF
+ velexample/WEB-INF/lib
+ velexample/WEB-INF/classes
+
+ - put the velocity-1.0.1.jar (or newer) into the velexample/WEB-INF/lib directory
+
+ - put the SampleServlet.class into the velexample/WEB-INF/classes directory
+
+ - put the sample.vm template into the velexample directory.
+
+ - at this point, you should be able to restart tomcat and access the servlet.
+
+ - so bounce tomcat, go into your web brower and go to :
+
+ http://<your computer's ip address>:8080/velexample/servlet/SampleServlet
+
+ - you should see the sample output.
+
+At this point, you are using Velocity!
+