(iseries)Backup and recover JSPs files
JSPs source and generated servlet classes, Hypertext Transfer Protocol (HTTP) configuration, and administrative configuration should be considered for backup when using JSPs files.
- Save installed applications. Application code and configuration such as bindings, is located by default in the profile_root/installedApps directory. By saving this directory, you save the installed applications, including HTML, servlets, JSPs, and enterprise beans. Normally, each application is located in a separate subdirectory, so we can choose to save all applications or a subset.
- Save all installed applications. The following command is wrapped for display purposes. Enter the following command as a single line, with a space between the end of DEV parameter and OBJ.
SAV DEV('/QSYS.lib/wsalib.lib/wsasavf.file') OBJ(('/profile_root/installedApps'))
- Save the sampleApp application only. The following command is wrapped for display purposes. Enter the following command as a single line, with a space between the end of DEV parameter and OBJ.
SAV DEV('/QSYS.lib/wsalib.lib/wsasavf.file') OBJ(('/profile_root/installedApps/cellName/sampleApp.ear'))
- Save and restore the JSP files. When JSP files are run, a servlet class is generated, compiled, and then run. When saving and restoring the JSP files, we can elect to save only the JSP source or the generated files as well.
- If we 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 we save and restore the source and generated files, no regeneration is done. If we have optimized Java programs to levels other than the default, this optimization is preserved.
Example
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:
/profile_root/temp/node/application_server/enterprise_app/web_module
In this example:
- profile is the name of the instance. The default instance name is default.
- node is the name of the iSeries server or partition on which the WebSphere Application Server instance is running
- application_server is the name of the WAS
- enterprise_app is the name of the enterprise application to which the JSP file belongs
- web_module is the web module containing your JSP file.
: A .dat file is a helper file used by the generated servlet.
Related concepts
JSPs
Related tasks
Assembling web applications