<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version"2.4">
<!--Mule configuration (Mule format)-->
<context-param>
<param-name>org.mule.config</param-name>
<param-value>mule-config.xml</param-value>
</context-param>
<listener>
<listener-class>org.mule.config.builders.MuleXmlBuilderContextListener</listener-class>
</listener>
<servlet-mapping>
<servlet-name>muleServlet</servlet-name>
<url-pattern>/app-path/*</url-pattern>
</servlet-mapping>
<!--Mule configuration ends-->
</web-app>
Deploying Mule to WebSphere
Before you can deploy your Mule application to an IBM WebSphere application server, you must prepare it as a web application. This involves creating a web.xml
file for your Mule application, then creating a .war
file of all the supporting files.
Creating the web.xml File
The web.xml
file configures the Mule application as a web application by specifying your Mule configuration file and other options for starting Mule in the WebSphere container. Create a web.xml
file for your Mule application as per the example below.
Deploying the Mule Application
-
Create a .
war
file for your project. Ensure that the.war
file contains theweb.xml
file as well as the configuration files, libraries and properties files for your Mule application. -
With the Mule profile running, open the WebSphere administrative console.
-
On the navigation bar on the left, click Applications, then click Install New Application.
-
For the root, browse to the location of your Mule application’s
.war
file on your local drive. -
For the context root, type a unique root such as
Mule
. -
Click Next in each of the wizard’s panel, then click Finish.
-
Save your settings.
-
Navigate to Enterprise Applications, select
muleApp.war
, and then click Start.
WebSphere starts your Mule application as an embedded web app. To confirm that it deployed correctly, check the MuleProfile/logs/server1/SystemOut.log
file.