How to get the generated java source for a JSP file
Technote (FAQ)
Problem
When debugging problems related to JSP files, many times, it is very
important to get the generated java source for the JSP. This document
describes various techniques in getting the java source generated for
the JSP file.
Solution
Depending on where you are in the J2EE Application Life Cycle, you can
do this in various methods. In all the below cases, the generated java
source for all newly compiled JSP files will be stored in the JSP
scratch directory, which by default is the WebSphere_Home/temp folder.
For more information, search for keepgenerated in the appropriate
version of the WebSphere® Application Server Information Center.
1. If you are in development phase and using tools like WebSphere
Studio Application Developer or Rational® Application Developer:
1. Open the deployment descriptor for the WebApplication.
2. Go to Extensions tab.
3. Add a new jsp attribute with name="keepgenerated" and
value="true".
4. Save all changes.
2. If you have already deployed your application and are using
JSPBatchCompiler to compile JSPs, then you can specify the keep
generated option for the JSP batch compiler:
JspBatchCompiler -
enterpriseapp.name enterprise_app_name -
webmodule.name web_module_name -
cell.name cell_name -
node.name
node_name -
server.name server_name [-filename jsp_name] -keepgenerated
true
3. If the application is already deployed and you do not want to
use JSP Batch compiler, you can modify the configuration file to do
the same as in the above first step:
1. Edit the ibm-web-ext.xmi located in WEB-INF file for the
installed Web application.
* Edit file in WebSphere_Home/config folder
* Do NOT edit the file in WebSphere_Home/
InstalledApps.
2. Add the line as shown below, indicated by underlining, at
the appropriate location in the same file:
<webappext:WebAppExtension xmi:version="2.0"
xmlns:xmi="
http://www.omg.org/XMI"
xmlns:webappext="webappext.xmi"
xmlns:webapplication="webapplication.xmi"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmi:id="WebAppExtension_1"
reloadInterval="3"
reloadingEnabled="true"
additionalClassPath=""
fileServingEnabled="true"
directoryBrowsingEnabled="false"
serveServletsByClassnameEnabled="true">
<webApp href="WEB-INF/web.xml#WebApp"/>
<jspAttributes xmi:id="JSPAttribute_1"
name="keepgenerated" value="true"/>
</webappext:WebAppExtension>
http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/index.jsp?topic=/com.ibm.support.waszos40.doc/html/JSP/swg21169723.html