1

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!

3 Answers 3

5

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

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.

1
  • Thanks for the tip. I think the problem is I am using JSTL 1.2, but Tomcat 5.5, so that is the mismatch.
    – pkaeding
    Feb 12, 2009 at 17:45
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.