IBM Support

Using Java 5 language feature in a JSP targeting WebSphere Application Server v6.1

Troubleshooting


Problem

WebSphere Application Server (WAS) version 6.1 uses JDK 1.5. By default the JSP's JDK source level still uses JDK 1.3 and this affects how the Java™ compiler compiles the JSP Java sources. Using the default, when the application is deployed on the server, it will fail with error like the following [] JSPG0049E: /admin/stats.jsp failed to compile : JSPG0091E: An error occurred at line: 34 in the file: /admin/stats.jsp JSPG0093E: Generated servlet error from file: /admin/stats.jsp C:\Program Files\IBM\SDP70\runtimes\base_v61\profiles\AppSrv01\temp\LNGDAYD-4142644 Node01\server1\solrEAR\solr.war\admin\_stats.java : 199 : Syntax error, 'for each' statements are only available if source level is 5.0 JSPG0091E: An error occurred at line: 38 in the file: /admin/stats.jsp JSPG0093E: Generated servlet error from file: /admin/stats.jsp[]

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Server Tooling","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF016","label":"Linux"}],"Version":"7.0;7.0.0.1;7.0.0.2;7.0.0.3","Edition":"All Editions","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
16 June 2018

UID

swg21264609