
There are various ways to deploy an application to a WebSphere Application Server (JVM).
- IBM WebSphere - Deploy application using WebSphere admin console
- IBM WebSphere - Deploy application using monitoredDeployableApps directory (properties file)
- IBM WebSphere - Deploy application using monitoredDeployableApps directory (EAR WAR JAR SAR) (this article)
- IBM WebSphere - Deploy application using Apache Ant (ws_ant)
A significant advantage to adding a properties file to the deploymentProperties directory is that you have more control at your disposal, such as being able to easily define the application name, mapping the application to a virtual host, and defining the context root of the application in the properties file.
By default, WebSphere is not setup to automatically deploy an app. Follow these steps to setup WebSphere to automatically deploy an app, which will also create the monitoredDeployableApps directory and subdirectories.
Add an EAR, WAR, JAR, or SAR to the appropriate monitoredDeployableApps subdirectory
Placing an EAR, WAR, JAR or SAR file in the subdirectory will automatically deploy the app to the server or cluster. The app should be in the was_home/profiles/your_profile/installedApps/ directory. The date and time listed should correlate to the date and time that the app was deployed.
~]# ll was_home/profiles/your_profile/installedApps/
drwxrwxr-x 4 root root 4096 May 1 07:49 your_app_name.ear
You can now check if the application was successfully deployed.
When an app is automatically deployed, the app may not be automatically mapped to certain resources (virtual host, modules, JNDI, et cetera).
- The web.xml file can be used to enable or disable the annotation scanning metadata complete attribute
- The ibm-web-ext.xml file can be used to define the context root for the application
- The ibm-web-bnd.xml file can be used to map the application to a virtual host during deployment
- The ibm-web-bnd.xml file can be used to map the application to a JNDI during deployment
- wsadmin can be used to map the application to a module during deployment
Automatic undeploy
Removing the EAR, WAR, JAR or SAR file will automatically undeploy the app. The SystemOut.log can be checked to ensure the app was undeployed.
CWLDD0007I: Event id 123456789. Start of processing. Event type: Deleted, File path: /path/to/example.properties
Did you find this article helpful?
If so, consider buying me a coffee over at