JavaServer Pages troubleshooting tips

Problems using the JavaServer Pages (JSP) engine

If you are having difficulty using the JavaServer Pages (JSP) engine, try these steps:

  1. Determine whether other resources such as .html files or servlets are being requested and displayed correctly. If they are not, the problem probably lies at a deeper level, such as with the HTTP server.
  2. If other resources are being displayed correctly, determine whether the JSP processor has started normally:
    • Browse the logs of the server hosting the JSP files you are trying to access. The following messages indicate that the JSP processor has started normally:
      Extension Processor [class com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor] 
      was initialized successfully. 
      Extension Processor [class com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor] 
      has been associated with patterns [*.jsp *.jspx *.jsw *.jsv ].
      If the JSP processor fails to load, you will see a message such as
      No Extension Processor found for handling JSPs.
      JSP Processor not defined. Skipping : jspfilename.
      in the server log files.
  3. If the JSP engine has started normally, the problem may be with the JSP file itself.
    • The JSP may have invalid JSP syntax and could not be processed by the JSP Processor. Examine the server log files of the target application for invalid JSP directive syntax messages. Errors similar to the following in a browser indicate this kind of problem:
      Message: /filename.jsp(2,1)JSPG0076E: Missing required attribute page for jsp element jsp:include 
      This example indicates that line 2, column 1 of the named JavaServer Pages file is missing a mandatory attribute for the jsp:include action. Similar messages are displayed for other syntax errors.
    • Examine the target application server's server log files files for problems with invalid Java syntax. Errors similar to Message: Unable to compile class for JSP in a browser indicate this kind of problem.

      The error message output from the Javac compiler will be found in the server log files. It might look like:

      JSPG0091E: An error occurred at line: 2 in the file: /myJsp.jsp 
      JSPG0093E: Generated servlet error: c:\WASROOT\temp\ ... 
      test.war\_myJsp.java:16: myInt is already defined in com.ibm.ws.jsp20._myJsp 
      int myInt = 122; String myString = "number is 122"; static int myStaticInt=22; 
      int myInt=121;                    
               ^  1 error
      

      Correct the error in the JSP file and retry the file.

JavaServer Pages fail to compile when using precompile

Symptom JavaServer Pages fail to compile during deployment through the administrative console when precompile is selected.
SystemErr R com.ibm.websphere.management.exception.AdminException: 
ADMA0021E: Error in compiling jsps - xyz.war (rc=1)
Problem JavaServer Pages fail to compile during deployment through the administrative console when precompile is selected when there is a dependency on another Java archive (JAR) file that is not available on any class path.
Recommended solution You may use wsadmin scripting to precompile JSP files during enterprise application deployment. However if you want to use the administrative console, then compile all JSP files before packaging the application.
  1. Add the dependent JAR to the deployment manager in a cell environment.
    1. Click System Administration > dmgr > Process Definition > Java Virtual Machine in the console navigation.
    2. Add fully qualified dependent JAR in class path field.
    3. Click OK.
    4. Restart deployment manager.
  2. Add the dependent JAR to the application server.
    1. Click System Administration > server1 > Process Definition > Java Virtual Machine in the console navigation.
    2. Add fully qualified dependent JAR in class path field.
    3. Click OK.
    4. Restart application server.

If none of these steps solves the problem, check to see if the problem is identified and documented using the links in Diagnosing and fixing problems: Resources for learning.

For current information available from IBM Support on known problems and their resolution, see the IBM Support page.

IBM Support has documents that can save you time gathering information needed to resolve this problem. Before opening a PMR, see the IBM Support page.


Related tasks
Troubleshooting by task: What are you trying to do?
Related reference
Troubleshooting installation problems



Searchable topic ID:   rtrb_jspcomp.xml
Last updated: Jun 21, 2007 9:56:50 PM CDT    WebSphere Application Server for z/OS, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/rtrb_jspcomp.html

Library | Support | Terms of Use | Feedback