每当我在我的jspx文件中使用c:foreach标记时,我都会遇到错误
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)
我该如何解决这个问题?这只与c:forEach有关。所有其他标签工作正常。我在EAR的APP-INF / lib文件夹中有以下jar文件,在WAR文件的WEB-INF / lib中有tiles-jsp-2.2.0.jar和jstl-1.2.jar。 web.xml版本 - 2.4
瓦片-API-2.2.0 瓷砖核心-2.2.0 瓷砖-JSP-2.2.0 瓷砖-的servlet-2.2.0 tiles-template-2.2.0
请帮助,提前致谢
答案 0 :(得分:2)
此异常表示JSTL API的版本比JSTL impl更新。事实上,Weblogic已经捆绑了JSTL。它显然比你的webapp中的旧版本更旧。较新的JSTL API已从您的webapp加载,但较旧的JSTL impl已从Weblogic加载。
从您的webapp中删除JSTL库,以便webapp只使用Weblogic自己的库。