Change or add WAR files
Overview
You can change WAR files on application servers without having to stop the server and start it again. You can perform any of these updates while the application server is running:
The variable application_root represents the directory that contains the expanded application files.
Change an existing JSP file
- Change the JSP file.
- Place the updated JSP file in the application_root/module_name directory or the appropriate subdirectory. The change is automatically detected, and the JSP is recompiled and reloaded.
- Hot deployment: Not applicable
- Dynamic reloading: Yes
- Restart the application: No
Add a new JSP file to an existing application
Place the new JSP file in the application_root/module_name directory or the appropriate subdirectory. The new file is detected automatically and compiled when the next request to the page is received.
- Hot deployment: Yes
- Dynamic reloading: Yes
- Restart the application: No
Change an existing servlet class (editing and recompiling)
- Place the new version of the servlet .class file in the directory...
application_root/module_name/WEB-INF/classesIf the .class file is part of a JAR file, you can place the new version of the JAR file in the directory...
application_root/module_name/WEB-INF/libIn either case, the change is detected automatically. The Web application is shut down and reinitialized, and picks up the new class.
- Update the application.
- If automatic reloading is enabled, you do not need to take further action. Automatic reloading detects the change.
- If automatic reloading is not enabled, use the administrative console or wsadmin to stop and restart the application.
- Hot deployment: Not applicable
- Dynamic reloading: Yes
- Restart the application: If automatic reloading is not enabled
Change a dependent class of an existing servlet class
- Place the new version of the dependent .class file in the directory...
application_root/module_name/WEB-INF/classesIf the .class file is part of a JAR file, you can place the new version of the JAR file in the directory...
application_root/module_name/WEB-INF/libIn either case, the change is detected automatically. The Web application is shut down and reinitialized, and picks up the new class.
- Update the application.
- If automatic reloading is enabled, you do not need to take further action. Automatic reloading detects the change.
- If automatic reloading is not enabled, use the administrative console or wsadmin to stop and restart the application.
- Hot deployment: Not applicable
- Dynamic reloading: Yes
- Restart the application: If automatic reloading is not enabled
Add a new servlet using the Invoker (Serve Servlets by class name) facility or add a dependent class to an existing application
- Place the new .class file in the directory...
application_root/module_name/WEB-INF/classesIf the .class file is part of a JAR file, you can place the new version of the JAR file in the directory...
application_root/module_name/WEB-INF/libIn either case, the change is detected automatically. The Web application is shut down and reinitialized, and picks up the new class.
Adding a new class is similar to updating an existing class. However,the Web application does not need to reload since the class has never been loaded before. The class is immediately available to the application.
- Update the application.
- If automatic reloading is enabled, you do not need to take further action. Automatic reloading detects the change.
- If automatic reloading is not enabled, use the administrative console or wsadmin to stop and restart the application.
- Hot deployment: Yes
- Dynamic reloading: Not applicable
- Restart the application: If automatic reloading is not enabled
Add a new servlet, including a new definition of the servlet in the web.xml deployment descriptor for the application
- Place the new .class file in the directory...
application_root/module_name/WEB-INF/classesIf the .class file is part of a JAR file, you can place the new version of the JAR file in the directory...
application_root/module_name/WEB-INF/libAutomatic reloading does not detect the new .class file.
- Edit the web.xml file in the directory...
application_root/module_name/WEB-INF/classesli>
- Use the administrative console or wsadmin to stop and restart the application. After you restart the application, the new servlet is available to the applications.
- Hot deployment: Yes
- Dynamic reloading: Not applicable
- Restart the application: Yes
Change the web.xml file of a WAR file
- Edit the web.xml file in the directory...
metadata_root/module_name/WEB-INF
The variable metadata_root represents the location of the metadata files for the specified application or module. See step 2 on Use hot deployment and dynamic reloading for information on the location of the metadata files.
- Use the administrative console or wsadmin to stop and restart the application.
- Hot deployment: Yes
- Dynamic reloading: Yes
- Restart the application: Yes
Change the ibm-web-ext.xmi file of a WAR file
- Edit the extension settings.
- Use the administrative console or wsadmin to stop and restart the application.
If you set the reloadInterval property to zero (0) or the reloadEnabled property to false, automatic reloading is disabled, and the application does not automatically detect changes to class files. To re-enable automatic reloading, change the appropriate property and restart the application.
- Hot deployment: Not applicable
- Dynamic reloading: Yes
- Restart the application: Yes
Change the ibm-web-bnd.xmi file of a WAR file
- Edit the bindings as needed. Ensure that you are binding to entities that are present in the configuration of the server.
- Use the administrative console or wsadmin to stop and restart the application.
- Hot deployment: Not applicable
- Dynamic reloading: Yes
- Restart the application: Yes