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. 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:

  1. Files that are statically included in the JSP

  2. Tag files that are used by the JSP, but only tag files that are not in Java Archive (JAR) files

  3. 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 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:

  1. The path to the dependency, relative to the Web module’s context root. For example: /dir1/frag1.jspf

  2. The long value representing the time the file was last modified. For example: 1082407108000

  3. 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";
  }

 

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:

  • The date and time the .java file was generated

  • The version, build number and build date of the WebSphere Application Server on which the .java file was generated

  • The values of the JSP engine configuration parameters that were in effect when the file was generated

  • The values of any <jsp-config> elements in the web.xml file that pertained to the source JSP file.

/*
C:/WebSphere_6.0/AppServer/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 WAS - 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 =                   [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]
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]
*/


 

See Also


Application life cycle listeners and events

 

See Also


Example: com.ibm.websphere.DBConnectionListener.java
Web applications: Resources for learning