为什么WebSphere 6.1(JDK 1.5兼容)将我的JSP编译为JDK 1.4? [英] Why WebSphere 6.1 (JDK 1.5 Compliant) compiles my JSPs as JDK 1.4?

查看:235
本文介绍了为什么WebSphere 6.1(JDK 1.5兼容)将我的JSP编译为JDK 1.4?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的web应用程序符合JDK 1.5,并且在WebSphere 6.1上运行成功。

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

但是,我们有一些包含1.5语法的Java代码的JSP无法编译WebSphere。

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

似乎由于某些原因,WebSphere将JSP视为1.4兼容并且无法编译。

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

任何想法为什么,如何解决这个? (停止在JSP中编写Java是一个答案,还有什么?)

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

推荐答案

如果使用RAD,到扩展选项卡,并添加新的jsp属性jdkSourceLevel和值15(无点)

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)

它将更改ibm-web.xml,并且条目将类似

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"/>

这篇关于为什么WebSphere 6.1(JDK 1.5兼容)将我的JSP编译为JDK 1.4?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆