[英]java.lang.AbstractMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext;
I am trying to set a variable that I will refer to in a custom JSP tag, so I have something like this in my JSP: 我试图设置一个将在自定义JSP标记中引用的变量,所以我的JSP中有类似以下内容:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="path" value="test"/>
However, I am getting this error when The JSP runs: 但是,JSP运行时出现此错误:
java.lang.AbstractMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext;
at org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:140)
I am running Tomcat 5.5, and Java 1.5, with JSTL 1.2. 我正在运行带有JSTL 1.2的Tomcat 5.5和Java 1.5。
Am I doing something wrong here? 我在这里做错什么了吗?
Thanks! 谢谢!
This seems to come up quite a bit. 这似乎很多。 We had Hadoop as a dependency and had to do multiple exclusions.
我们将Hadoop作为依赖项,并且必须进行多个排除。 Some of these are probably redundant, but this finally worked.
其中一些可能是多余的,但这最终奏效了。 I should note that there was no change until I started excluding Jasper at the bottom.
我应该注意,直到我开始排除底部的Jasper之前,都没有任何变化。
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
</exclusion>
</exclusions>
Tomcat 5.5 does not support Servlet API 2.5 which is used by JSTL 1.2. Tomcat 5.5不支持JSTL 1.2使用的Servlet API 2.5。
Upgrade to Tomcat 6.0 or downgrade the Servlet / JSP / JSTL versions. 升级到Tomcat 6.0或降级Servlet / JSP / JSTL版本。
see http://tomcat.apache.org/whichversion.html 参见http://tomcat.apache.org/whichversion.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.