Generated .java files
When the JSP engine’s keepgenerated configuration parameter is set to true, the .java file that is generated for JavaServer Pages (JSP) is retained. The .java 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:
- Files that are statically included in the JSP
- Tag files that are used by the JSP, but only tag files that are not in Java™ Archive (JAR) files
- TLD files that are used by the JSP, but only TLDs that are not in JAR files
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 following example, three JSP fragments, one TLD and one tag file are dependencies of the
JSP jsp1.jsp. There are three parts to each array entry:
- The path to the dependency, relative to the web module’s context root. For example: /dir1/frag1.jspf
- The long value representing the time the file was last modified. For example: 1082407108000
- The String representation of the long value. For example: Mon Apr 19 16:38:28 EDT 2004
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";
}
版本、JSP 引擎选项和 WEB.XML 信息
生成的 .java 源代码包含注释,该注释列出位于所生成文件末尾的文件的信息。此信息包含:
- .java 文件生成的日期和时间
- 生成 .java 文件的 WebSphere® Application Server 的版本、构建号和构建日期
- 生成文件时有效的 JSP 引擎配置参数的值
- 与源 JSP 文件有关的 web.xml 文件中的任何 <jsp-config> 元素的值。
/*
profile_root/installedApps/MyCell/sampleApp.ear/examples.war/WEB-INF/classes/_ibmjsp/_jsp1.java
was generated @ Wed May 03 10:05:56 EDT 2006![[AIX Solaris HP-UX Linux Windows]](../images/dist.gif)
profile_root/AppSrv01/installedApps/MyCell/sampleApp.ear/examples.war/WEB-INF/classes/_ibmjsp/_jsp1.java
was generated @ Wed May 03 10:05:56 EDT 2006IBM WebSphere Application Server - ND, 6.1.0.0
Build Number: o0441.04
Build Date: 05/01/06
********************************************************
The JSP engine configuration parameters were set as follows:
classDebugInfo = [false]
debugEnabled = [false]
deprecation = [false]
compileWithAssert = [false]
jdkSourceLevel = [13]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]
![[AIX Solaris HP-UX Linux Windows]](../images/dist.gif)
outputDir = [C:/WebSphere_6.0/AppServer/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]
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]
*/