This page last changed on Oct 02, 2006 by lajos@mulesource.com.
The Mule Webapp provides a user interface to some of the Mule examples such as the LoanBroker, Hello World and Echo examples. It also provides examples of accessing Mule using REST style service calls and is itself an example of how to embed Mule in a webapp.
Prerequisites
You should have the MULE_HOME environment variable set to the root of your Mule distribution.
Preparation
- Open a shell*.
- From the root of the Mule distribution go to examples/ant/webapp or examples/maven/webapp
- If you are running this example for the first time and want to use Ant (version 1.6.5 or later) to build the web application:
- Make sure you are in the examples/ant/webapp directory
- Run the Ant script - 'ant'
- You should see output indicating that the .war file has been built
- Copy the .war file, found in the build subdirectory, to the deployment directory for your servlet engine
- If you are running this example for the first time and want to use Maven to to build the web application:
- Make sure you are in the examples/maven/webapp directory
- Run Maven - 'mvn'
- You should see output indicating that the .war file has been built
- Copy the .war file, found in the build subdirectory, to the deployment directory for your servlet engine
Notes for Apache Tomcat 5.0
This Mule sample has been tested on Apache Tomcat 5.0.28 and later
Apache Tomcat comes with a JMX implementation that will conflict with that contained in the Mule web application. In the Tomcat bin directory, you will find a jar file called jmx.jar. Move this to a safe location. Copy the WEB-INF/lib/mx4j-3.0.1.jar file from the Mule webapp to the Tomcat bin directory, and rename it to jmx.jar. Now restart Tomcat is the Mule webapp context should start.
Webapp Contents
The webapp contains the following -
|