Add or change WAR files
You use the update wizard of the admin console to change Web app archives files (*.war) without having to restart appservers. (hot deployment).
See also: Change enterprise application files.
The following table lists the changes that we can make by manipulating a WAR file on the server where the application is deployed.
Change Hot deployment Dynamic reloading Change an existing JSP. N/A Yes Add a new JSP to an existing application. Yes Yes Change an existing servlet class by editing and recompiling. N/A Yes Change a dependent class of an existing servlet class. N/A Yes Add a new servlet using the Invoker (Serve Servlets by class name) facility or add a dependent class to an existing application. Yes N/A Add a new servlet, including a new definition of the servlet in the web.xml deployment descriptor for the application. Yes N/A Change web.xml Yes Yes Change ibm-web-ext.xmi. N/A Yes Change the ibm-web-bnd.xmi N/A Yes
- Change an existing JSP.
Place the changed JSP file directly in...
APP_ROOT/module_name...or the appropriate subdirectory.
If reloading of classes is enabled and the polling interval is greater than zero (0), the application files are reloaded after the application is updated. For JSPs in a Web module, a Web container reloads JSPs only when the IBM extension jspReloadingEnabled in the jspAttributes of the ibm-web-ext.xmi file is set to true.
- Add a new JSP file to an existing application.
Place the new JSP file directly in...
APP_ROOT/module_name...or the appropriate subdirectory.
- Change an existing servlet class by editing and recompiling.
- Place the new version of the servlet .class file directly in...
APP_ROOT/module_name/WEB-INF/classes
If the .class file is part of a Jar file, we can place the new version of the Jar file directly...
APP_ROOT/module_name/WEB-INF/lib
In either case, the change will be detected, the Web app will be shut down and reinitialized, picking up the new class.
- If automatic reloading is not enabled, restart the application. Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
If automatic reloading is enabled, you do not need to take further action. Automatic reloading will detect the change.
- Change a dependent class of an existing servlet class.
- Place the new version of the dependent .class file directly in...
APP_ROOT/module_name/WEB-INF/classes
If the .class file is part of a Jar file, we can place the new version of the Jar file directly in...
APP_ROOT/module_name/WEB-INF/lib
In either case, the change will be detected, the Web app will be shut down and reinitialized, picking up the new class.
- If automatic reloading is not enabled, restart the application. Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
If automatic reloading is enabled, you do not need to take further action. Automatic reloading will detect the change.
- 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 directly in...
APP_ROOT/module_name/WEB-INF/classes
If the .class file is part of a Jar file, we can place the new version of the Jar file directly in...
APP_ROOT/module_name/WEB-INF/libIn either case, the change will be detected, the Web app will be shut down and reinitialized, picking up the new class.
This case is treated the same as changing an existing class. The difference is that adding the servlet or class does not immediately cause the Web app to reload because the class has never been loaded before. The class simply becomes available for execution.
- If automatic reloading is not enabled, restart the application.
Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
If automatic reloading is enabled, you do not need to take further action. Automatic reloading will detect the change.
- 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 directly in...
APP_ROOT/module_name/WEB-INF/classes
If the .class file is part of a Jar file, we can place the new version of the Jar file directly in...
APP_ROOT/module_name/WEB-INF/lib
We can edit web.xml in place or copy it into...
APP_ROOT/module_name/WEB-INF/classes
The new .class file will not trigger a reloading of the application.
- Restart the application.
Use the admin console to restart the application.
Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin. After the application restarts, the new servlet is available for service.
- Change web.xml of a WAR file.
- Edit web.xml in place or copy it into the metadata_root/module_name/WEB-INF directory.
- Restart the application.
Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
- Change the ibm-web-ext.xmi file of a WAR file.
Edit the extension settings as needed. We can change all of the extension settings. The only warning is if we set the reloadInterval property to zero (0) or the reloadEnabled property to false, the application no longer automatically detects changes to class files. Both of these changes disable the automatic reloading function. The only way to re-enable automatic reloading is to change the appropriate property and restart the application. See other task descriptions in this file for information on restarting an application.
Deprecated feature: The reloadInterval and reloadingEnabled attributes of the IBM deployment descriptor extensions, including both the WAR file extension WEB-INF/ibm-web-ext.xmi and the application extension META-INF/ibm-application-ext.xmi are deprecated.
- Change the ibm-web-bnd.xmi file of a WAR file.
- Edit the bindings as needed. We can change all of the values but verify the entities we are binding to are present in the configuration of the server.
- Restart the application.
Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
Related tasks
Hot deployment and dynamic reloading
Starting applications with scripting
Stopping applications with scripting