Make changes without re-deploying the war file in JBOSS EAP

Latest response

Hi,
I am trying to find out is there a way to update a file without redeploying the war file again in JBOSS 6 EAP. In Tomcat, I can go to the TOMCAT_HOME/webapps/xyz_application and find a file (e.g. login.jsp or web.xml) and make changes. Depending on the changes, I may need to shutdown or restart the Tomcat. This has been a quick way to ensure the changes work. However, I could not find a way in JBOSS. (Eventually I will make the changes into the war file anyway in case we need to deploy on other JBOSS instances.) . Thanks.

Responses

Hi James,

Generally, if you are using a deployment file (like an EAR or a WAR), you will need to redeploy the whole deployment (usually by dropping the updated application file in the EAP deployments directory, or re-deploying it using the CLI or Management Console.

If your EAP server is a development environment, you can deploy an exploded (i.e unzipped) version of your application to the deployments directory and enable Development Mode in the web subsystem, so that jsp changes are picked-up dynamically: see https://access.redhat.com/solutions/189163.

Note that Development Mode is not recommended for production environments.

You can also see the Application Deployment chapter of the Administration and Configuration Guide for more info on deployment scanners that scan for application changes to automatically redeploy updated applications.

Hi Lucas,
Thanks for the reply. The WAR file is the third party vendor application; we are not doing any development work. I just update; for example, database connection string and jar the files back to the WAR and then deploy the WAR. However, sometimes vendor has a fix or configuration changes that we need to update. I was hoping that I could go to the exploded (i.e unzipped) of the application to make changes without going through the whole jar, undeploy and deploy process. In addition, I don't think I can STOP the application without "disable" the application (which it will undeploy the application).
So based on your answer, I guess I could not have the similar approach like Tomcat. Thanks.

Are you using Red Hat JBoss Developer Studio? [1] This will allow you to do a full publish to the server. It will still do a full build depending on what you've changed but the process is a lot faster and avoids you having to switch from an IDE to a console for example.

Depending on the changes a restart may still be unavoidable.

[1] https://access.redhat.com/articles/1303463#Deploy

James,

The WAR redeployment method is recommended because you can then be sure that the entire application is redeployed and not somehow partially redeployed.

As for your other question of stopping an application, I believe the JBoss EAP equivalent is to disable the deployed application, as is explained at [1].

[1] https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html-single/Administration_and_Configuration_Guide/index.html#Undeploy_an_Application_Using_the_Management_Console