JSPG0122E:无法解析Websphere 7中的EL函数

时间:2014-09-17 06:58:20

标签: java jstl el websphere-7 websphere-8

我试图使用pagestep函数,在单个JSP页面中使用多个函数。为实现这一目标,我使用的是JSTL。这是代码:

<c:if test="${pageStep.equals('init') || pageStep.equals('search') || pageStep.equals('createSubmit') || pageStep.equals('delete') || pageStep.equals('editSubmit')}">

在这段代码中,我收到了一个错误。堆栈如下:

com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /secure/systemparameters/UploadTransData/uploadTransData.jsp:  
/secure/systemparameters/UploadTransData/uploadTransData.jsp(38,2) --> JSPG0122E: Unable to parse EL function ${pageStep.equals('init') || pageStep.equals('search') || pageStep.equals('createSubmit') || pageStep.equals('delete') || pageStep.equals('editSubmit')}.
    at com.ibm.ws.jsp.translator.visitor.validator.ELValidator.validateElFunction(ELValidator.java:497)
    at com.ibm.ws.jsp.translator.visitor.validator.ELValidator.validateELExpression(ELValidator.java:119)
    at com.ibm.ws.jsp.translator.visitor.validator.ELValidator.validateELExpression(ELValidator.java:146)
    at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateCustomTagAttribute(ValidateVisitor.java:1724)
    at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateCustomTagAttributeValues(ValidateVisitor.java:1374)
    at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitCustomTagStart(ValidateVisitor.java:289)
    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: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:239)
    at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:109)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:465)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:433)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:292)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:142)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:335)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:325)
    at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1225)
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1012)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)

我不允许升级到Websphere 8.我必须坚持使用Websphere 7.此代码在Tomcat和Weblogic中运行时没有任何问题。

我似乎无法对此问题进行排序。帮助将不胜感激。

1 个答案:

答案 0 :(得分:2)

Java EE 6(WAS v8)支持使用EL中的参数调用方法。在WAS v7中,您需要以下语法:

<c:if test="${pageStep eq 'init' || pageStep eq 'search' 
   || pageStep eq 'createSubmit' || pageStep eq 'delete' 
   || pageStep eq 'editSubmit'}">