您的位置:首页 > Web前端 > JavaScript

websphere下jsp页面不支持泛型问题

2012-06-15 17:07 337 查看
WAS6.1中JSP引擎配置参数

由于WAS6.1采用JDK5.0,所以如果JSP中嵌入的代码包含JDK5.0的特性,编译的时候会出错。所以需要设置相应的JSP引擎配置参数如下:

jdkSourceLevel

这是在 WebSphere Application Server V6.1 中引入的支持 JDK 5 的新 JSP 引擎参数。此参数的缺省值为 13。该参数需要重新生成 Java 源代码。以下是 jdkSourceLevel 参数值:

13(缺省值) - 此值将禁用 JDK 1.4 和 JDK 5.0 的所有新的语言功能部件。

14 - 此值将启用断言工具并将禁用 JDK 5.0 的所有新的语言功能部件。

15 - 此值将启用断言工具和 JDK 5.0 的所有新的语言功能部件。

此参数需要通过编辑WEB-INF/ibm-web-ext.xmi 文件设置,格式如下:

<?xml version="1.0" encoding="UTF-8"?>

<webappext:WebAppExtension xmi:version="2.0" xmlns:xmi=http://www.omg.org/XMI

xmlns:webappext="webappext.xmi" xmlns:webapplication="webapplication.xmi" xmi:id="WebAppExtension_1"

reloadInterval="9" reloadingEnabled="true" defaultErrorPage="error.jsp" additionalClassPath=""

fileServingEnabled="true" directoryBrowsingEnabled="false" serveServletsByClassnameEnabled="true"

autoRequestEncoding="true" autoResponseEncoding="false"

<webApp href="WEB-INF/web.xml#WebApp_1"/>

<jspAttributes xmi:id="JSPAttribute_0" name="jdkSourceLevel" value="15"/>

<jspAttributes xmi:id="JSPAttribute_1" name="useThreadTagPool" value="true"/>

<jspAttributes xmi:id="JSPAttribute_2" name="verbose" value="false"/>

<jspAttributes xmi:id="JSPAttribute_3" name="deprecation" value="false"/>

<jspAttributes xmi:id="JSPAttribute_4" name="reloadEnabled" value="true"/>

<jspAttributes xmi:id="JSPAttribute_5" name="reloadInterval" value="5"/>

<jspAttributes xmi:id="JSPAttribute_6" name="keepgenerated" value="true"/>

<!-<jspAttributes xmi:id="JSPAttribute_7" name="trackDependencies" value="true"/> ->

</webappext:WebAppExtension>

http://gocom.primeton.com/modules/newbb/forumtopic19180_13134_25.htm

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: