From db7dc8d59f11196a031157d072f2ccba5a714f7b Mon Sep 17 00:00:00 2001 From: slaws Date: Wed, 20 Oct 2010 15:29:51 +0000 Subject: Add some words about what it means to package a contribution for running in a webapp and correct some mistakes in the existing text git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1025616 13f79535-47bb-0310-9956-ffa450edef68 --- .../trunk/samples/running-tuscany/webapp/README | 42 ++++++++++++++++++---- 1 file changed, 36 insertions(+), 6 deletions(-) (limited to 'sca-java-2.x/trunk/samples/running-tuscany') diff --git a/sca-java-2.x/trunk/samples/running-tuscany/webapp/README b/sca-java-2.x/trunk/samples/running-tuscany/webapp/README index 4031b9c0bd..2d80e36a79 100644 --- a/sca-java-2.x/trunk/samples/running-tuscany/webapp/README +++ b/sca-java-2.x/trunk/samples/running-tuscany/webapp/README @@ -1,9 +1,38 @@ -To execute sample webapp based contributions (contributions that have webapp at the end of their name) you -can build the contribution using maven and then copy the resulting war file to your container of choice +The Tuscany SCA Java runtime can run inside a webapp (a WAR) and expose +services when the webapp is started. In order for this to work +a number of things have to be in place in the webapp: -For example, for binding-jsonrpc/contribution-calculator-webapp, do the following +1. The Tuscany runtime jars have to be packaed in the webapp WEB-INF/lib + directory +2. The Tuscany HTTP filter servlet has to be configured in the + WEB-INF/web.xml file using something like: -cd samples/binding-jsonrpc/contribution-calculator-webapp + + tuscany + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany + /* + + +3. The composite application has to packaged in the WAR file. When the + TuscanyServletFilter started it effectvely reads its own WAR file as + the contribution. As an alternative you can package complete + contribution archives in the WEB-INF/sca-contributions directory. + +In the getting-started/helloworl-webapp sample we provided a Maven +build script that perform these WAR packaging steps. + +To execute a webapp based contributions (sample contributions that have webapp +at the end of their name) you can build the contribution using maven and then +copy the resulting war file to your web container of choice + +For example, for learning-more/binding-jsonrpc/contribution-calculator-webapp, +do the following + +cd learning-more/binding-jsonrpc/contribution-calculator-webapp mvn cp target/sample-contribution-binding-jsonrpc-calculator-webapp.war your_container_deployment-dir @@ -17,9 +46,10 @@ webapp contributions that have the following configuration in their pom.xml file 6.1.18 -For contributions that have this, for example, binding-jsonrpc/contribution-calculator-webapp, do the following +For contributions that have this, for example, +learning-more/binding-jsonrpc/contribution-calculator-webapp, do the following -cd samples/binding-sca/contribution-calculator +cd learning-more/binding-jsonrpc/contribution-calculator-webapp mvn jetty:run This will launch the contribution in the Jetty runtime and then wait. At this point you can use -- cgit v1.2.3