问题
i have this code which is not working.
<jsp:useBean id="abbreviationlist" class="AbbreviationListType"/>
<jsp:setProperty name="abbreviationlist" property="id"/>
<table>
<c:forEach items="${abbreviationlist.list}" var="abbreviation">
</c:forEach>
</table>
and i have the class AbbreviationListType with set and get methods for the list- get singnature is =
public List<AbbreviationType> getList()
can someone please point out what i am doing wrong ? cause this doesnt work and i get this stack trace:
javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext; java.lang.NoSuchMethodError:javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContex; at javax.servlet.jsp.jstl.core.LoopTagSupport.unExposeVariables(LoopTagSupport.java:620) .....................
here is my WEB-INF/lib

and my catalina/common/lib

回答1:
You have the wrong version of something. Remove all el-api
, jsp-api
and the jstl*
jars from your lib folder. They are shipped with your servlet container
来源:https://stackoverflow.com/questions/4253954/java-lang-nosuchmethoderrorjavax-servlet-jsp-pagecontext-getelcontextljavax-e