summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/samples/running-tuscany/webapp/README
blob: 4031b9c0bd35f7d3b5fcc021714ed75a6d94b066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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

For example, for binding-jsonrpc/contribution-calculator-webapp, do the following

cd samples/binding-jsonrpc/contribution-calculator-webapp
mvn 
cp target/sample-contribution-binding-jsonrpc-calculator-webapp.war your_container_deployment-dir


As an alternative sample webapp based contributions can be run within Jetty directly from Maven, look for 
webapp contributions that have the following configuration in their pom.xml file:

<plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>maven-jetty-plugin</artifactId>
    <version>6.1.18</version>
</plugin>

For contributions that have this, for example, binding-jsonrpc/contribution-calculator-webapp, do the following

cd samples/binding-sca/contribution-calculator
mvn jetty:run

This will launch the contribution in the Jetty runtime and then wait. At this point you can use
HTTP clients to send messages to services that the running SCA applcation exposes. For this 
example try pointing your browser at:

http://localhost:8080/sample-contribution-binding-jsonrpc-calculator-webapp/