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
This exception indicates that the JSTL API is of a newer version than the JSTL impl. And indeed, Weblogic already ships with JSTL bundled. It's apparently of an older version than the one in your webapp. The newer JSTL API is been loaded from your webapp, but the older JSTL impl is been loaded from Weblogic.
Remove the JSTL libraries from your webapp so that the webapp will just use Weblogic's own ones.