java – JSPG0122E:无法解析Websphere 8中的EL函数
作者:互联网
我正在将Web应用程序从Websphere 6.1移动到Websphere 8,我在其中一个JSP页面中遇到以下错误:
com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /jsp/myJsp.jsp: /jsp/myJsp.jsp(863,4) –> JSPG0122E: Unable to parse EL function ${not empty rowVo.operation.package}. at com.ibm.ws.jsp.translator.visitor.validator.ELValidator.validateElFunction(ELValidator.java:500) at com.ibm.ws.jsp.translator.visitor.validator.ELValidator.validateELExpression(ELValidator.java:122) at com.ibm.ws.jsp.translator.visitor.validator.ELValidator.validateELExpression(ELValidator.java:149) at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateCustomTagAttribute(ValidateVisitor.java:1757) at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateCustomTagAttributeValues(ValidateVisitor.java:1405) at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitCustomTagStart(ValidateVisitor.java:294) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:366) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:369) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:369) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:234) at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:216) at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:127) at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:254) at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:121)
JSP文件中的违规部分如下所示:
<c:forEach var="rowVo"
items="${searchResultContainer.searchResultRowsPage}"
varStatus="opStatus">
<c:if test="${not empty rowVo.operation.jobscopeDescription}">
<td>${rowVo.operation.jobscopeDescription}</td>
</c:if>
<c:if test="${not empty rowVo.operation.package}">
<td>${rowVo.operation.package}</td>
</c:if>
</c:forEach>
让我感到困惑的是,当第二个EL表达式几乎相同时,从第三个EL表达式抛出异常.
操作是生成的类:
public class Operation {
//Other properties omitted
@XmlElement(name = "package")
protected List<Package> _package;
protected List<String> jobscopeDescription;
public List<Package> getPackage() {
if (_package == null) {
_package = new ArrayList<Package>();
}
return this._package;
}
public List<String> getJobscopeDescription() {
if (jobscopeDescription == null) {
jobscopeDescription = new ArrayList<String>();
}
return this.jobscopeDescription;
}
}
这些文件在迁移期间没有更改,并且在WAS 6.1上运行良好.有没有人知道这里有什么问题?
解决方法:
在WebSphere Application Server v8.0及更高版本中,负责检查保留关键字作为EL变量标识符的使用的代码得到了增强,从而使检查更加严格.变量检查代码不仅检查保留的EL关键字,还检查Java保留关键字.
有关详细信息,请参阅此文章:http://www-01.ibm.com/support/docview.wss?uid=swg21642419&myns=swgws&mynp=OCSSEQTP&mync=A
标签:java,jstl,el,websphere-8,websphere-6-1 来源: https://codeday.me/bug/20190728/1566613.html