geirm 01/02/11 19:06:30
Modified: examples README.txt
Removed: examples DBContextTest.java Example.class Example.java
Example2.class Example2.java SampleServlet.class
SampleServlet.java TreeMapContext.java
dbcontexttest.sh dbtest.vm example.sh example.vm
example2.sh example2.vm sample.vm
velocity.properties
Log:
Removing all in one shot (the one-by-one got boring...)
Will be adding all source, shells, and example templates back
into separate directories - I think this will be better for
firstime users to keep things simple. Class files will no
longer be distributed - the will be generated by the build
process
Revision Changes Path
1.7 +44 -20 jakarta-velocity/examples/README.txt
Index: README.txt
===================================================================
RCS file: /home/cvs/jakarta-velocity/examples/README.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- README.txt 2001/02/11 20:20:58 1.6
+++ README.txt 2001/02/12 03:06:30 1.7
@@ -1,40 +1,64 @@
Welcome to Velocity!
-The files in this directory demonstrate how the Velocity template engine
-can be used.
+This directory contains a few examples to help get you started.
-1a) Example.java: This simple example shows how to use the Velocity Template Engine
-in a standalone program. It should be pre-compiled for you. Run it using the
example
-template provided (example.vm):
+As always, the if you have any questions :
- ./example.sh
+1) Make sure you followed any directions :) (did you build everything?)
+2) Review documentation included in this package, or online at
+ http://jakarta.apache.org/velocity
+3) Ask on the velocity-user list. This is a great source of support information.
+ To join, read http://jakarta.apache.org/site/mail.html and then follow the
+ link at the bottom to join the lists.
+
+
+To build these examples easily, you can just use the build script provided in the
+distribution. In the build directory (contained in the root directory of the
+distribution) :
-If you wish to recompile the example, remember to include the velocity jar in
- your classpath, or just specify it on the command line :
+Under unix : ./build-velocity.sh examples
+Under windows : build-velocity.bat examples
- javac -classpath .:../bin/velocity-X.jar Example.java
+Velocity Examples
+=================
-where 'X' in the jar filename is the current version of the jar.
+app_example1
+------------
+This simple example shows how to use the Velocity Template Engine
+in a standalone program. It should be pre-compiled for you. Run it using the
example
+template provided (example.vm):
-1b) Example2.java : Another simple example showing how to use Velocity in a
standalone
+ ./example.sh
+
+app_example2
+------------
+Another simple example showing how to use Velocity in a standalone
program. This examples uses the org.apache.velocity.util.Velocity application
utility
class, which provides a few convenient methods for application programmers. It also
should be precompiled for you. To run :
./example2.sh
-
-
-2) SimpleServlet.java: This is a simple example of how Velocity can be used with
your favorite servlet
-engine. <need to review the code - gmj>
+servlet_example1
+---------------
+This is a simple example of how Velocity can be used with
+ 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
+
+context_example
+--------------
+This is a demonstration of 2 different context implementations :
+ - a context implementation that uses a database as the storage.
+ Use the DBContextTest program to test. See the DBContextTest.java file for the
+ db table info. Unsupported demonstration code. You may need to futz with
+ it to get it to work in your environment. To run, use the dbcontexttest.sh
+ script.
+ - a context implementation that uses a TreeMap for storage. Very simple.
-3) DBContext.java : simple demonstration of a context implementation that uses a
database as the
-storage. Use the DBContextTest program to test. See the DBContextTest.java file
for the db table
-info. Unsupported demonstration code. You may need to futz with it to get it to
work in your
-environment. To run, use the dbcontexttest.sh script.
Thanks for using Velocity!
- the Velocity team
-