Hot Deployment is very commonly used in development of Java EE applications. It is also referred as Auto Deploy or Hot Swap at some places. But the purpose is to automatically re-deploy the changes done done on the server without server restart. These changes usually include:

  • Change in class files
  • JSP , HTML, JavaScript, CSS and other static resource changes.

Different servers support different kind of auto deployment. You need to check with the server docs for the auto deploy changes supported by it. Here I am sharing the steps to enable or disable hot deployment in four famous servers i.e. Tomcat, JBoss, WebLogic and GlassFish.

Hot Deployment in Tomcat :

  • Go to $TOMCAT_HOME/conf/server.xml
  • Search for “autoDeploy”
  • Make sure the value is set true and save the file
  • Restart Server

Auto Deployment in JBoss :

  • Go to $JBOSS_HOME/conf/jboss-service.xml
  • Search for “ScanEnabled”
  • Make sure the value is set true and save the file
  • You can also change the scan period for detecting changes by modifying “ScanPeriod” attribute in this XML.
  • Restart Server

Hot Swap in WebLogic :

Running WebLogic in development mode:

  • Go to config folder of your domain in WebLogic and edit config.xml.
  • Search for “production-mode-enabled”
  • Set the value to false
  • Restart Server

Steps for Hot Swap:

  • Start server in development mode. We need to enable FastSwap feature of WebLogic server.
  • Open “weblogic-application.xml” file in your application.
  • Add “true” to this file.
  • Save and close the file.
  • Restart Server in Development mode as this feature will not work if server is started in production mode.

Auto Deploy in GlassFish :

  • Start server.
  • Go to server admin console. This is usually http://localhost:8080/
  • Select advanced tab.
  • Select Application Configuration tab.
  • Check the Auto Deploy checkbox for enabling hot deployment.
  • You will also see options for specifying Auto Deploy poll period and JSP pre-compilation.
  • Restart Server.

Related Posts

Configure Hot Deployment in Tomcat, JBoss,WebLogic admin Java EE
Hot Deployment is very commonly used in development of Java EE applications. It is also referred as Auto Deploy or Hot Swap at some places. But the purpose is to automatically re-deploy the changes done done on the server without server restart. These changes usually include: Change in class files JSP...
Hot Deployment is very commonly used in development of Java EE applications. It is also referred as Auto Deploy or Hot Swap at some places. But the purpose is to automatically re-deploy the changes done done on the server without server restart. These changes usually include: <ul> <li>Change in class files</li> <li>JSP , HTML, JavaScript, CSS and other static resource changes.</li> </ul> Different servers support different kind of auto deployment. You need to check with the server docs for the auto deploy changes supported by it. Here I am sharing the steps to enable or disable hot deployment in four famous servers i.e. Tomcat, JBoss, WebLogic and GlassFish. <img src="http://www.javaexperience.com/wp-content/uploads/2012/09/hot-deploy.jpg" alt="" title="hot-deploy" width="165" height="158" class="alignnone size-full wp-image-256" /> <h2>Hot Deployment in Tomcat :</h2> <ul> <li>Go to $TOMCAT_HOME/conf/server.xml</li> <li>Search for "autoDeploy"</li> <li>Make sure the value is set true and save the file</li> <li>Restart Server</li> </ul> <h2>Auto Deployment in JBoss :</h2> <ul> <li>Go to $JBOSS_HOME/conf/jboss-service.xml</li> <li>Search for "ScanEnabled"</li> <li>Make sure the value is set true and save the file</li> <li>You can also change the scan period for detecting changes by modifying "ScanPeriod" attribute in this XML.</li> <li>Restart Server</li> </ul> <h2>Hot Swap in WebLogic :</h2> <strong>Running WebLogic in development mode:</strong> <ul> <li>Go to config folder of your domain in WebLogic and edit config.xml.</li> <li>Search for "production-mode-enabled"</li> <li>Set the value to false</li> <li>Restart Server</li> </ul> <strong>Steps for Hot Swap:</strong> <ul> <li>Start server in development mode. We need to enable FastSwap feature of WebLogic server.</li> <li>Open "weblogic-application.xml" file in your application.</li> <li>Add "<fast-swap>true</fast-swap>" to this file.</li> <li>Save and close the file.</li> <li>Restart Server in Development mode as this feature will not work if server is started in production mode.</li> </ul> <h2>Auto Deploy in GlassFish :</h2> <ul> <li>Start server.</li> <li>Go to server admin console. This is usually http://localhost:8080/</li> <li>Select advanced tab.</li> <li>Select Application Configuration tab.</li> <li>Check the Auto Deploy checkbox for enabling hot deployment.</li> <li>You will also see options for specifying Auto Deploy poll period and JSP pre-compilation.</li> <li>Restart Server.</li> </ul>
Sending character response from Servlet
Map Servlet and JSP to URL
The following two tabs change content below.
I run this blog with lots of passion. In this website, you will find tutorials on Core Java, Spring, Struts, Web Applications, Portals and Database. Please support me and the website by sharing the posts on your facebook / twitter. You can tap the share button at the top of each post. Thanks for the support.

Latest posts by admin (see all)

Comments

comments