JSP processor
When you configure your Web server instance to work with the WAS for iSeries product, the Web server configuration is set to pass HTTP requests for JSP files (files with the extension .jsp) to WAS. The JSP processor creates and compiles a servlet for each JSP file.
These following points apply to the JSP processor that is implemented in WAS:
The servlet that implements the JSP processor is org.apache.jasper.runtime.JspServlet.
WAS places the generated files in a temp directory under the WebSphere instance. For example, the default instance stores the generated files in
/QIBM/UserData/WebAS5/Base/default/temp/node/appserver/enterprise_app/web_module...where...
node iSeries server or partition on which your WAS instance is running appserver WAS enterprise_app enterprise application to which the JSP file belongs web_module contains your JSP file
When the processor generates the servlet, two or three files are created, depending on the JSP processor settings:
.class file
Compiled servlet. Always created and kept.
.java file
Generated source (.java) file. Created during the compilation of a JSP page, but the processor only keeps the file if it is told to do so. You can retain the .java file by setting an initialization parameter (for the JSP attributes) called keepgenerated to a value of true. This setting leaves the generated .java file in...
/QIBM/UserData/WebAS5/Base/default/temp/node/appserver/enterprise_app/web_moduleBy default this value is not specified as an init parameter, and thus the default behavior is to not keep the generated .java file.
.dat file
This contains the static (HTML code and text content) part of the original JSP file.
workingDir is an init() parameter that is specified by default. However, this parameter is ignored by the JSP processor.
For more information about how to set JSP attributes that are used by servlets, see: JavaServer Pages attribute assembly settings .
Keeping generated Java source files
The JSP processor generates a Java source file for each JSP file. By default, this file is deleted immediately. It is recommended that you keep the generated .java file for debugging purposes only. It is safer and more efficient to configure the JSP processor to delete generated .java files in a production environment.
If you want to keep the generated .java files for a JSP page, follow these steps:
- Start the Application Assembly Tool.
- Open the Web module you want to modify.
- Expand Assembly Property Extensions under the Web module.
- Right-click JSP Attributes and select New.
- Set the value of Name to keepgenerated.
- Set the value of Value to true.
- Click File --> Save.
- (Optional) If you are working with a compressed Web module, install the modified module.
- If the application server is running, use the administrative console to stop the application server, then start it.