1

whenever I use a c:foreach tag in my jspx files I'm getting below error

Caused by: java.lang.NoSuchMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext;
    at javax.servlet.jsp.jstl.core.LoopTagSupport.unExposeVariables(LoopTagSupport.java:587)
    at javax.servlet.jsp.jstl.core.LoopTagSupport.doFinally(LoopTagSupport.java:323)
    at jsp_servlet._web_45_inf._views.__matchdriverpopup_jspx._jspService(__matchdriverpopup_jspx.java:1160)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:496)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:245)
    at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:241)

How can I solve this? This is only related to c:forEach. All other tags are working fine. I have follwing jar files in APP-INF/lib folder of EAR and tiles-jsp-2.2.0.jar and jstl-1.2.jar in my WEB-INF/lib of WAR file. web.xml version - 2.4

tiles-api-2.2.0 tiles-core-2.2.0 tiles-jsp-2.2.0 tiles-servlet-2.2.0 tiles-template-2.2.0

Please help, Thanks in advance

4

1 回答 1

2

此异常表明 JSTL API 的版本比 JSTL impl 更新。事实上,Weblogic 已经捆绑了 JSTL。它显然比您的 webapp 中的版本旧。较新的 JSTL API 是从您的 webapp 加载的,但较旧的 JSTL impl 是从 Weblogic 加载的。

从您的 webapp 中删除 JSTL 库,以便 webapp 将只使用 Weblogic 自己的库。

于 2012-05-03T23:29:44.177 回答