Save and restore: JavaServer Pages(TM) (JSP(TM)) files
The following items should be considered for backup when using JavaServer Pages(TM) (JSP(TM)) files:
- JSP source and generated servlet classes
- HTTP configuration
- administrative configuration
JSP source and generated servlet classes
Application code and configuration (such as bindings) is located by default in the /QIBM/UserData/WebAS5/Base/instanceName/installedApps directory. By saving this directory, you save your installed applications, including HTML, servlets, JavaServer Pages (JSP) files, and enterprise beans. Normally, each application is located in a separate subdirectory, so you can choose to save all applications or a subset.
Note: The following commands have been wrapped for display purposes. Enter each as a single command, with a space between the end of DEV parameter and OBJ.
This command saves all installed applications:
SAV DEV('/QSYS.lib/wsalib.lib/wsasavf.file') OBJ(('/QIBM/UserData/WebAS5/Base/instance/installedApps'))This command saves the sampleApp application only:
SAV DEV('/QSYS.lib/wsalib.lib/wsasavf.file') OBJ(('/QIBM/UserData/WebAS5/Base/instance/installedApps/cellName/sampleApp.ear'))When JSP files are run, a servlet class is generated, compiled, and then run. When saving and restoring your JSP files, you can elect to save only the JSP source or the generated files as well.
- If you save and restore only the JSP source, the servlet source and class files are regenerated when they are invoked. This is a simpler, smaller save and restore operation. Note that regeneration slows the first requests, and default optimization is done on the generated Java programs.
- If you save and restore the source and generated files, no regeneration is done. If you have optimized Java programs to levels other than the default, this optimization is preserved.
WebSphere Application Server places the generated files (.class, .java, and optionally, .dat) in a temporary directory under the WebSphere Application Server instance. For example, the default instance stores the generated files in this directory:
/QIBM/UserData/WebAS5/Base/instanceName/temp/node_name/application_server/enterprise_app/web_moduleIn this example:
- instanceName is the name of your instance. The default instance name is default.
- node_name is the name of the iSeries server or partition on which your WebSphere Application Server instance is running
- application_server is the name of your WebSphere Application Server
- enterprise_app is the name of the enterprise application to which the JSP file belongs
- web_module is the Web module that contains your JSP file.
Note: A .dat file is a helper file used by the generated servlet.