Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting error while accessing the Map from Spring Controller to JSP using JSTL
    text
    copied!<p>I have a spring controller in which I am returning a Map named "model"; model contains some set of values but importantly also contains an <code>ArrayList</code>. Now I am returning this Map to my JSP, while using JSTL in my JSP to fetch the <code>ArrayList</code> it throws error.</p> <pre class="lang-html prettyprint-override"><code>&lt;c:forEach items="${model.result}" var="data" varStatus="status"&gt; &lt;!-- result is my ArrayList --&gt; &lt;c:out value="${data.url}" /&gt; &lt;!-- here url is data inside my result arraylist --&gt; &lt;/c:forEach&gt; </code></pre> <p>The error generated is:</p> <pre><code>root cause 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._jsp.__searchsuccess._jsp__tag3(__searchsuccess.java:294) at jsp_servlet._jsp.__searchsuccess._jspService(__searchsuccess.java:137) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) </code></pre> <p>It works fine on Tomcat Server but when I deploy it on Weblogic(9.2) server it gives the error. My classpath entries are:</p> <pre class="lang-xml prettyprint-override"><code>&lt;classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/&gt; &lt;classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-fileupload-1.1.1.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-io-1.2.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-logging-1.1.1.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-validator-4.0.2.GA.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4j-1.2.14.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/slf4j-api-1.5.6.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/slf4j-log4j12-1.5.6.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-asm-3.0.3.RELEASE.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-beans-3.0.3.RELEASE.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-context-3.0.3.RELEASE.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-core-3.0.3.RELEASE.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-expression-3.0.3.RELEASE.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-web-3.0.3.RELEASE.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-webmvc-3.0.3.RELEASE.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/validation-api-1.0.0.GA.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4j-1.2.9.jar"/&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/servlet-2.3.jar"/&gt; &lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre6"&gt; &lt;attributes&gt; &lt;attribute name="owner.project.facets" value="jst.java"/&gt; &lt;/attributes&gt; &lt;/classpathentry&gt; &lt;classpathentry kind="lib" path="WebContent/WEB-INF/lib/jstl-1.2.jar"/&gt; &lt;classpathentry kind="output" path="WebContent/WEB-INF/classes"/&gt; </code></pre> <hr> <p><strong>Update</strong>: I have removed the jstl-1.2.jar and now I get a compilation error: </p> <pre><code>searchsuccess.jsp:1:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during pa rsing of the .tld file. &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt; ^----^ searchsuccess.jsp:1:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during pa rsing of the .tld file. &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt; ^----^ at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:298) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:200) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:164) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235) at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:394) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload