Project: Jetty
Revision: 3600
Author: janb
Date: 04 Sep 2008 00:47:00
Changes:Update instructions on how to run these other demo webapps.
Files:modified: /jetty/trunk/modules/examples/jndi-example-webapp/pom.xml (
try)
modified: /jetty/trunk/modules/examples/jndi-example-webapp/README.txt (
try)
modified: /jetty/trunk/README.txt (
try)
modified: /jetty/trunk/modules/examples/jetty-annotation-example-webapp/pom.xml (
try)
modified: /jetty/trunk/modules/examples/jetty-annotation-example-webapp/README.txt (
try)
modified: /jetty/trunk/modules/examples/jetty-example-webapp/src/main/webapp/index.html (
try)
Diff:
| ... | ...@@ -28,6 +28,7 @@ |
| 28 | 28 | <fileset dir="../../../contexts-available/test-jndi.d/" includes="**/**" /> |
| 29 | 29 | </delete> |
| 30 | 30 | <delete failonerror="false" file="../../../contexts-available/test-jndi.xml" /> |
| 31 | <delete failonerror="false" file="../../../contexts-available/README-test-jndi.txt" /> |
| 31 | 32 | </tasks> |
| 32 | 33 | </configuration> |
| 33 | 34 | </execution> |
| ... | ...@@ -58,6 +59,7 @@ |
| 58 | 59 | <tasks> |
| 59 | 60 | <unjar src="target/${project.artifactId}-${project.version}.${project.packaging}" dest="../../../contexts-available/test-jndi.d/" /> |
| 60 | 61 | <copy file="target/config/test-jndi.xml" todir="../../../contexts-available" overwrite="true" /> |
| 62 | <copy file="README.txt" tofile="../../../contexts-available/README-test-jndi.txt" overwrite="true" /> |
| 61 | 63 | </tasks> |
| 62 | 64 | </configuration> |
| 63 | 65 | </execution> |
| ... | ...@@ -1,41 +1,53 @@ |
| 1 | | After Building |
| 1 | Deploying |
| 2 | 2 | -------------- |
| 3 | | After you have built the example, you will need to edit a couple |
| 4 | | of files to uncomment the appropriate configuration for the |
| 5 | | transaction manager you are using. |
| 3 | Jetty does not ship with a native transaction manager, but |
| 4 | can plugin a variety of solutions. This demo has been tested |
| 5 | with both JOTM (http://jotm.objectweb.org) or Atomikos |
| 6 | (http://www.atomikos.com). |
| 7 | |
| 8 | You will need to download the relevant jars for your chosen |
| 9 | transaction manager, and install them into $JETTY-HOME/lib/ext. |
| 10 | See the jetty wiki pages for JOTM(http://docs.codehaus.org/display/JETTY/JOTM) |
| 11 | and Atomikos (http://docs.codehaus.org/display/JETTY/Atomikos) |
| 12 | for more info. |
| 13 | |
| 14 | The example uses the Derby database, so also download the |
| 15 | derby.jar and derbytools.jar file from the Derby site |
| 16 | (http://db.apache.org/derby) and put them in $JETTY-HOME/lib/ext. |
| 6 | 17 | |
| 7 | | + edit contexts/test-jndi.xml and uncomment one of the transaction |
| 8 | | manager setups. |
| 18 | Copy or move the test-jndi.xml file to $JETTY-HOME/contexts. |
| 19 | Copy or move the test-jndi.d directory to $JETTY-HOME/contexts. |
| 9 | 20 | |
| 10 | | + edit contexts/test-jndi.d/WEB-INF/jetty-env.xml and uncomment |
| 11 | | one of the transaction manager setups. |
| 21 | Now edit $JETTY-HOME/contexts/test-jndi.xml and uncomment one of the |
| 22 | transaction manager setups. |
| 23 | |
| 24 | Edit $JETTY-HOME/contexts/test-jndi.d/WEB-INF/jetty-env.xml and uncomment |
| 25 | one of the transaction manager setups. |
| 12 | 26 | |
| 13 | 27 | |
| 14 | 28 | Running the Demo |
| 15 | 29 | ---------------- |
| 16 | | You will need to copy a derby.jar to the jetty lib/ directory, as well |
| 17 | | as copy all the necessary jars for the flavour of transaction manager |
| 18 | | you are using. There are instructions for some of the popular |
| 19 | | transaction managers on the wiki at: |
| 20 | | |
| 21 | | http://docs.codehaus.org/display/JETTY/Jetty+Documentation |
| 22 | | |
| 23 | 30 | You run the demo like so: |
| 24 | 31 | |
| 25 | | java -DOPTIONS=plus -jar start.jar |
| 32 | java -DOPTIONS=plus,ext,default -jar start.jar |
| 26 | 33 | |
| 27 | 34 | |
| 28 | 35 | Adding Support for a Different Transaction Manager |
| 29 | 36 | -------------------------------------------------- |
| 30 | 37 | |
| 31 | | 1. Edit the src/etc/templates/filter.properties file and add |
| 32 | | a new set of token and replacement strings following the |
| 38 | 1. Edit the filter.properties file in |
| 39 | $JETTY-HOME/modules/examples/jndi-example-webapp/src/etc/templates |
| 40 | and add a new set of token and replacement strings following the |
| 33 | 41 | pattern established for ATOMIKOS and JOTM. |
| 34 | 42 | |
| 35 | | 2. Edit the src/etc/templates/jetty-env.xml file and add |
| 36 | | configuration for new transaction manager following the |
| 43 | 2. Edit the jetty-env.xml file in |
| 44 | $JETTY-HOME/modules/examples/jndi-example-webapp/src/etc/templates |
| 45 | and add configuration for new transaction manager following the |
| 37 | 46 | pattern established for the other transaction managers. |
| 38 | 47 | |
| 39 | | 3. Edit the src/etc/templates/jetty-test-jndi.xml file and |
| 40 | | add configuration for the new transaction manager following |
| 48 | 3. Edit jetty-test-jndi.xml file in |
| 49 | $JETTY-HOME/modules/examples/jndi-example-webapp/src/etc/templates |
| 50 | and add configuration for the new transaction manager following |
| 41 | 51 | the pattern established for the other transaction managers. |
| 52 | |
| 53 | 4. Rebuild $JETTY-HOME/modules/examples/jndi-example-webapp (mvn clean install). |
| ... | ...@@ -57,6 +57,13 @@ |
| 57 | 57 | in /etc/init.d |
| 58 | 58 | |
| 59 | 59 | |
| 60 | OTHER DEMOS |
| 61 | =========== |
| 62 | |
| 63 | There are more demo webapps available in the $JETTY-HOME/contexts-available |
| 64 | directory. See the README files in that directory for instructions. |
| 65 | |
| 66 | |
| 60 | 67 | JETTY OPTIONS |
| 61 | 68 | ============= |
| 62 | 69 | Unlike Jetty-6, the start.jar of jetty-7 does not automatically |
| ... | ...@@ -73,6 +80,7 @@ |
| 73 | 80 | ssl (default) |
| 74 | 81 | plus |
| 75 | 82 | annotations |
| 83 | ext |
| 76 | 84 | wadi |
| 77 | 85 | grizzly |
| 78 | 86 | jmx |
| ... | ...@@ -128,7 +136,7 @@ |
| 128 | 136 | The server can be run as JettyPlus (JNDI, JAAS etc.) with the |
| 129 | 137 | command: |
| 130 | 138 | |
| 131 | | java -DOPTIONS=plus -jar start.jar etc/jetty.xml etc/jetty-plus.xml |
| 139 | java -DOPTIONS=plus,ext -jar start.jar etc/jetty.xml etc/jetty-plus.xml |
| 132 | 140 | |
| 133 | 141 | This command adds the plus configuration file after the server configuration file, |
| 134 | 142 | although you will first need to follow the instructions inside the etc/jetty-plus.xml |
| ... | ...@@ -28,6 +28,7 @@ |
| 28 | 28 | <fileset dir="../../../contexts-available/"> |
| 29 | 29 | <include name="test-annotations.d/**" /> |
| 30 | 30 | <include name="test-annotations.xml" /> |
| 31 | <include name="README-test-annotations.txt" /> |
| 31 | 32 | </fileset> |
| 32 | 33 | </delete> |
| 33 | 34 | </tasks> |
| ... | ...@@ -60,6 +61,7 @@ |
| 60 | 61 | <tasks> |
| 61 | 62 | <unjar src="target/${project.artifactId}-${project.version}.${project.packaging}" dest="../../../contexts-available/test-annotations.d/" /> |
| 62 | 63 | <copy file="target/config/annotations-context.xml" tofile="../../../contexts-available/test-annotations.xml" overwrite="true" /> |
| 64 | <copy file="README.txt" tofile="../../../contexts-available/README-test-annotations.txt" overwrite="true"/> |
| 63 | 65 | </tasks> |
| 64 | 66 | </configuration> |
| 65 | 67 | </execution> |
| ... | ...@@ -1,35 +1,50 @@ |
| 1 | | After Building |
| 2 | | -------------- |
| 3 | | After you have built the example, you will need to |
| 4 | | edit contexts/annotations-context.xml and uncomment |
| 5 | | one of the transaction manager setups. |
| 1 | Deploying |
| 2 | --------- |
| 3 | Copy or move the $JETTY-HOME/contexts-available/test-annotations.d |
| 4 | directory to $JETTY-HOME/contexts, and copy or move the |
| 5 | $JETTY-HOME/contexts-available/test-annotations.xml file to |
| 6 | $JETTY-HOME/contexts. |
| 7 | |
| 8 | Edit $JETTY-HOME/contexts/test-annotations.xml and uncomment |
| 9 | the setup for the transaction manager of your choice. The demo |
| 10 | works with either JOTM (http://jotm.objectweb.org) or Atomikos |
| 11 | (http://www.atomikos.com). |
| 12 | |
| 13 | Download and copy the jar files necessary for your transaction |
| 14 | manager to $JETTY-HOME/lib/ext. See the jetty wiki pages for |
| 15 | JOTM(http://docs.codehaus.org/display/JETTY/JOTM) and |
| 16 | Atomikos (http://docs.codehaus.org/display/JETTY/Atomikos) |
| 17 | for more info. |
| 18 | |
| 19 | The example uses the Derby database, so also download the |
| 20 | derby.jar and derbytools.jar file from the Derby site |
| 21 | (http://db.apache.org/derby) and put them in $JETTY-HOME/lib/ext. |
| 22 | |
| 6 | 23 | |
| 7 | 24 | |
| 8 | 25 | Running the Demo |
| 9 | 26 | ---------------- |
| 10 | | You will need to copy a derby.jar to the jetty lib/ directory, as well |
| 11 | | as copy all the necessary jars for the flavour of transaction manager |
| 12 | | you are using. There are instructions for some of the popular |
| 13 | | transaction managers on the wiki at: |
| 14 | | |
| 15 | | http://docs.codehaus.org/display/JETTY/Jetty+User+Guides |
| 16 | | |
| 17 | 27 | You run the demo like so: |
| 18 | 28 | |
| 19 | | java -jar start.jar |
| 29 | java -DOPTIONS=plus,ext,annotations,default -jar start.jar |
| 20 | 30 | |
| 21 | 31 | |
| 22 | 32 | Adding Support for a Different Transaction Manager |
| 23 | 33 | -------------------------------------------------- |
| 24 | 34 | |
| 25 | | 1. Edit the src/etc/templates/filter.properties file and add |
| 26 | | a new set of token and replacement strings following the |
| 35 | 1. Edit the filter.properties file in |
| 36 | $JETTY-HOME/modules/examples/jetty-annotation-example-webapp/src/etc/templates |
| 37 | and add a new set of token and replacement strings following the |
| 27 | 38 | pattern established for ATOMIKOS and JOTM. |
| 28 | 39 | |
| 29 | | 2. Edit the src/etc/templates/jetty-env.xml file and add |
| 30 | | configuration for new transaction manager following the |
| 40 | 2. Edit the jetty-env.xml file in |
| 41 | $JETTY-HOME/modules/examples/jetty-annotation-example-webapp/src/etc/templates |
| 42 | and add configuration for new transaction manager following the |
| 31 | 43 | pattern established for the other transaction managers. |
| 32 | 44 | |
| 33 | | 3. Edit the src/etc/templates/annotations-context.xml file and |
| 34 | | add configuration for the new transaction manager following |
| 45 | 3. Edit the annotations-context.xml file in |
| 46 | $JETTY-HOME/modules/examples/jetty-annotation-example-webapp/src/etc/templates |
| 47 | and add configuration for the new transaction manager following |
| 35 | 48 | the pattern established for the other transaction managers. |
| 49 | |
| 50 | 4. Rebuild $JETTY-HOME/modules/examples/jetty-annotation-example-webapp (mvn clean install). |
| ... | ...@@ -35,11 +35,13 @@ |
| 35 | 35 | </p> |
| 36 | 36 | |
| 37 | 37 | <p> |
| 38 | | Other contexts: |
| 38 | Other demonstration contexts, some of which may need manual deployment |
| 39 | (check the README.txt file for details): |
| 39 | 40 | <ul> |
| 40 | 41 | <li>a <a href="/cometd/">AJAX Cometd Chat with Bayeux</a></li> |
| 41 | 42 | <li> the <a href="/javadoc/">javadoc</a> </li> |
| 42 | 43 | <li> a demo of the <a href="/test-jndi">JNDI features</a></li> |
| 44 | <li> a demo of the <a href="/test-annotations">Annotation features</a></li> |
| 43 | 45 | <li> a demo of the <a href="/test-jaas">JAAS features</a></li> |
| 44 | 46 | </ul> |
| 45 | 47 | </p> |
To list