在 WebSphere Application Server 6.1 实例上,无法编译 /sample/saml2/sp/configure.jsp 和 /sample/saml2/idp/configure.jsp 文件。configure.jsp 文件要求 JDK 1.5,但 WebSphere Application Server 6.1 中 JSP 文件的 JDK 源级别设置为 JDK 1.3。
解决方法:编缉 JSP 引擎配置参数以将 JDK 源级别设置为 1.5:
打开 WEB-INF/ibm-web-ext.xmi 文件。
JSP 引擎配置参数存储在 WEB-INF/ibm-web-ext.xmi 文件的 Web 模块配置目录或 Web 模块二进制目录中:
配置目录。例如:
{WAS_ROOT}/profiles/profilename/config/cells/cellname/applications/ enterpriseappname/deployments/deployedname/webmodulename/
二进制目录,如果在“使用二进制配置”标记设置为“真”的情况下将应用程序部署到 WebSphere Application Server。例如:
{WAS_ROOT}/profiles/profilename/installedApps/nodename/ enterpriseappname/webmodulename/
删除 compileWithAssert 参数,方法是从文件中删除语句,或用注释标记(<!— 和 –>)将语句括起来。
添加值为 15 的 jdkSourceLevel 参数。例如:
<jspAttributes xmi:id="JSPAttribute_1" name="jdkSourceLevel" value="15"/>
注:文件内的 JSPAttribute_1 中的整数 (_1) 必须是唯一的。
保存 ibm-web-ext.xmi 文件。
重新启动应用程序。
有关 jdkSourceLevel 参数和其他 JSP 引擎配置参数的详细信息,参见: