JavaServer Pages engine troubleshooting tips

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 JVM 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 root_dir/logs/servername/SystemOut.log file

    • Open the Log analyzer on the service log of the server which is hosting the JavaServer Pages file you are trying to access and use it to browse error and warning messages.

  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 root_dir/logs/servername/SystemOut.log file 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 SystemErr.log 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 SystemErr.log. 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.

    • 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 SystemErr.log . 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.

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. If you do not see a problem that resembles yours, or if the information provided does not solve your problem, contact IBM support for further assistance.

For current information available from IBM Support on known problems and their resolution, see the IBM Support page. The IBM Support page contains documents that can save you time gathering information needed to resolve this problem.


 

Related Tasks


Troubleshooting by task

 

See Also


Troubleshooting installation problems

 



 

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.