When the JSP engine's keepgenerated configuration parameter is set to true, the .java file that is generated for JavaServer Pages (JSP) is retained. This file contains information that is useful in debugging.
Dependency information
In the .java file, immediately following the class declaration, an array of dependent files is defined, if the source JSP has any dependencies. There are three types of files that are tracked as dependencies:
This array is always generated, but the JSP engine uses it, in determining whether a JSP needs to be recompiled, only when the trackDependencies parameter is set to true. In the example below, three JSP fragments, one TLD and one tag file are dependencies of the JSP jsp1.jsp. There are three parts to each array entry:
public final class _jsp1 extends com.ibm.ws.jsp.runtime.HttpJspBase implements com.ibm.ws.jsp.runtime.JspClassInformation { private static String[] _jspx_dependants; static { _jspx_dependants = new String[5]; _jspx_dependants[0] = "/Banner.jspf^1082407108000^Mon Apr 19 16:38:28 EDT 2004"; _jspx_dependants[1] = "/Footer.jspf^1077657462000^Tue Feb 24 16:17:42 EST 2004"; _jspx_dependants[2] = "/dir1/frag1.jspf^1035396680000^Wed Oct 23 14:11:20 EDT 2002"; _jspx_dependants[3] = "/utility.tld^1080069938000^Tue Mar 23 14:25:38 EST 2004"; _jspx_dependants[4] = "/WEB-INF/tags/top.tag^1065440490000^Mon Oct 06 07:41:30 EDT 2003"; }
Version, JSP engine options, and WEB.XML information
The generated .java source contains a comment that lists information about the file which is located at the bottom of the generated file. This information includes:
/* /QIBM/UserData/WebSphere/AppServer/V6/ND/profiles/AppSrv01/installedApps/MyCell/sampleApp.ear/examples.war/WEB-INF/classes/_ibmjsp/_jsp1.java was generated @ Thu Oct 14 10:05:56 EDT 2004 IBM WebSphere Application Server - ND, 6.0.0.0 Build Number: o0441.04 Build Date: 10/12/04 ******************************************************** The JSP engine configuration parameters were set as follows: classDebugInfo = [false] debugEnabled = [false] deprecation = [false] compileWithAssert = [false] disableJspRuntimeCompilation =[false] extendedDocumentRoot = [null] ieClassId = [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] keepGenerated = [true] outputDir = [/QIBM/UserData/WebSphere/AppServer/V6/ND/profiles/AppSrv01/installedApps/MyCell/sampleApp.ear/examples.war/WEB-INF/classes] reloadEnabled = [true] reloadEnabledSet = [true] reloadInterval = [5000] trackDependencies = [false] usePageTagPool = [false] useThreadTagPool = [true] useImplicitTagLibs = [true] verbose = [false] looseLibMap = [null] useJikes = [false] useFullPackageNames = [true] translationContextClass = [null] extensionProcessorClass = [null] jspCompileClasspath = [] javaEncoding = [UTF-8] autoResponseEncoding = [false] ******************************************************** The following JSP Configuration Parameters were obtained from web.xml: prelude list = [[]] coda list = [[]] elIgnored = [false] pageEncoding = [null] isXML = [false] scriptingInvalid = [false] */
Related concepts
Application life cycle listeners and events
Related reference
Example: com.ibm.websphere.DBConnectionListener.java
Web applications: Resources for learning