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[
]
Resolving The Problem
The WAS Information Center specifies that if the application is installed for the first time using the admin console, it gives an option to specify the JDK Source level. Inside Rational Application Developer, they can use the Web Deployment Descriptor Editor.
On the Web Extension tab there is a JSP Attributes table where they can add a new jsp attribute entering jdkSourceLevel as name and 15 as value. This will put an entry to the
like the following
Web Project/WEB-INF/ibm-web-ext.xmi
<jspAttributes xmi:id="JSPAttribute_1" name="jdkSourceLevel" value="15"/>
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21264609