JSPG0122E: Unable to parse EL function in Websphere 8

后端 未结 2 1704
遇见更好的自我
遇见更好的自我 2021-01-20 05:18

I am moving a web application from Websphere 6.1 to Websphere 8, and I am encountering the following error in one of my JSP pages:

com.

相关标签:
2条回答
  • 2021-01-20 05:39

    The code responsible for checking for the use of reserved keywords as EL variable identifiers was enhanced in WebSphere Application Server v8.0 and beyond, making the checking more strict. The variable checking code not only checks for reserved EL keywords, but also Java reserved keywords.

    See this article for more info: http://www-01.ibm.com/support/docview.wss?uid=swg21642419&myns=swgws&mynp=OCSSEQTP&mync=A

    0 讨论(0)
  • 2021-01-20 05:41

    It seems this error was due to Websphere 8 not being able to parse EL expressions containing a package property or variable. For example, changing the above to

    <c:if test="${not empty rowVo.operation.getPackage()}">
    

    made it work.

    I also made a little test of my theory with this little snippet:

    <c:set var="salary" scope="session" value="${2000*2}"/>
    <c:out value="Salary: ${salary}"/>
    

    runs fine and produces the expected output Salary: 4000. However,

    <c:set var="package" scope="session" value="${2000*2}"/>
    <c:out value="Salary: ${package}"/>
    

    produces the same error as above.

    0 讨论(0)
提交回复
热议问题