工作中在本地的环境中(tomcat)调试好的JSP页面,移植到服务器上(WebSphere)造成jsp文件中的EL表达式无法解析。
并且报出如下错误:
E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet 错误]-[/WEB-INF/content/pd/license/showJLicenseApplySum.jsp]: com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: 转换 /WEB-INF/content/pd/license/showJLicenseApplySum.jsp:
/WEB-INF/content/pd/license/showJLicenseApplySum.jsp(0,1) --> JSPG0122E: 无法解析 EL 函数 ${countjlLicense.getXinZhengLingshou() }。
时捕获异常
通过搜索,找到如下解决办法:
http://stackoverflow.com/questions/20844130/jspg0122e-unable-to-parse-el-function-in-websphere-7
参考该文章的解决办法,经过修改尝试,解决了自己的问题,修改过程如下:
<td>
<span class="hyperlinkBlue02">${countjlLicense.getXinZhengLingshou() }</span>
</td>
修改为
<td>
<span class="hyperlinkBlue02">${countjlLicense.xinZhengLingshou}</span>
</td>
猜测这是由于WebSphere和Jsp的版本原因造成的问题,至于为什么要这样写,没有去深究。