简体   繁体   English

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

[英]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>

Looks like you may have some versioning problem, maybe a conflicting jar file of some sort. 看起来您可能有版本控制问题,也许是某种冲突的jar文件。 Look here , maybe it'll help. 这里 ,也许会有所帮助。 You need to supply some more info about your runtime environment if you can't solve it. 如果无法解决,则需要提供有关运行时环境的更多信息。

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.

相关问题 java.lang.AbstractMethodError:javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax / servlet / ServletContext;) - java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;) java.lang.ClassNotFoundException:javax.el.E​​LContext - java.lang.ClassNotFoundException: javax.el.ELContext java.lang.AbstractMethodError - java.lang.AbstractMethodError java.lang.AbstractMethodError:org.hibernate.ejb.criteria.CriteriaBuilderImpl.createCriteriaDelete()Ljavax / persistence / criteria / CriteriaDelete; - java.lang.AbstractMethodError: org.hibernate.ejb.criteria.CriteriaBuilderImpl.createCriteriaDelete()Ljavax/persistence/criteria/CriteriaDelete; java.lang.NoSuchMethodError:javax.el.E​​xpressionFactory.newInstance()Ljavax / el / ExpressionFactory; - java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory; java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V - java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V Java异常java.lang.AbstractMethodError - Java Exception java.lang.AbstractMethodError java.lang.NoSuchMethodError:javax.el.E​​xpressionFactory.getStreamELResolver()Ljavax / el / ELResolver; - java.lang.NoSuchMethodError: javax.el.ExpressionFactory.getStreamELResolver()Ljavax/el/ELResolver; java.lang.AbstractMethodError: javax.ws.rs.core.Response$ResponseBuilder.status - java.lang.AbstractMethodError: javax.ws.rs.core.Response$ResponseBuilder.status 错误StatusLogger捕获java.lang.AbstractMethodError - ERROR StatusLogger Caught java.lang.AbstractMethodError
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM