java.lang.AbstractMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext;

发布于 2024-07-13 18:05:24 字数 514 浏览 5 评论 0原文

我正在尝试设置一个将在自定义 JSP 标记中引用的变量,因此我的 JSP 中有类似的内容:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="path" value="test"/>

但是,当 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)

我正在运行 Tomcat 5.5 和 Java 1.5,与 JSTL 1.2。

我在这里做错了什么吗?

谢谢!

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:

<%@ 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:

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.

Am I doing something wrong here?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

乄_柒ぐ汐 2024-07-20 18:05:24

这似乎出现了不少。 我们将 Hadoop 作为依赖项,并且必须进行多次排除。 其中一些可能是多余的,但这最终奏效了。 我应该指出,直到我开始将贾斯珀排除在底部之前,情况没有任何变化。

<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>

This seems to come up quite a bit. We had Hadoop as a dependency and had to do multiple exclusions. 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.

<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>
萧瑟寒风 2024-07-20 18:05:24

看起来您可能遇到一些版本控制问题,可能是某种冲突的 jar 文件。 看看这里,也许会有帮助。 如果您无法解决问题,则需要提供有关运行时环境的更多信息。

Looks like you may have some versioning problem, maybe a conflicting jar file of some sort. Look here, maybe it'll help. You need to supply some more info about your runtime environment if you can't solve it.

亽野灬性zι浪 2024-07-20 18:05:24

Tomcat 5.5 不支持 JSTL 1.2 使用的 Servlet API 2.5。

升级到Tomcat 6.0或降级Servlet/JSP/JSTL版本。

请参阅 http://tomcat.apache.org/whichversion.html

Tomcat 5.5 does not support Servlet API 2.5 which is used by JSTL 1.2.

Upgrade to Tomcat 6.0 or downgrade the Servlet / JSP / JSTL versions.

see http://tomcat.apache.org/whichversion.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文