Search code examples
jspwebspherecompilationjava-5websphere-6.1

Why WebSphere 6.1 (JDK 1.5 Compliant) compiles my JSPs as JDK 1.4?


Our web application is JDK 1.5 compliant, and is running succesfuly on WebSphere 6.1

However, some JSPs we have that contain Java code in 1.5 syntax fail to compile by WebSphere.

It seems that for some reason, WebSphere treats the JSPs as 1.4 complient and fails to compile.

Any idea why and how to solve this? (Stop writing Java in JSPs is one answer, what else?)


Solution

  • if you are using RAD, open web.xml go to extensions tab and add new jsp attribute jdkSourceLevel and value 15 (no dot in it)

    it will change ibm-web.xml and entry would look like

      <webApp href="WEB-INF/web.xml#WebApp_ID"/>
      <jspAttributes xmi:id="JSPAttribute_1" name="jdkSourceLevel" value="15"/>