tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viktor Gars" <>
Subject NoClassDefFoundError: JspContext when using pageContext.getOut()
Date Mon, 24 Feb 2003 22:16:36 GMT

I have a tag that contins this code
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.tagext.TagSupport;
public class TestTag extends TagSupport
public int doEndTag()
throws JspTagException
catch(Exception e)
and the tld and web.xml looks like this
<?xml version="1.0"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
<shortname>test TLD</shortname>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
and the JSP that call that uses the tag looks like this
<%@ taglib prefix="test" uri="/test" %>
everything is very basic. But when I try to run this code I get this error
javax.servlet.ServletException: javax/servlet/jsp/JspContext
 at org.apache.jasper.servlet.JspServlet.service(
 at javax.servlet.http.HttpServlet.service(

root cause java.lang.NoClassDefFoundError: javax/servlet/jsp/JspContext
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(

I have located the error (my normal tag is much bigger) to the
pageContext.getOut() function, every other function seems to work ok with
pageContext, I dont get any error messages when using getAttribute,
setAttribute, getSession and setSession.
I have looked in the jar files in Tomcats lib dir to se if I can find
JspContext but I have not found it so I relay dont know what is happening. I
hope anyone here knows :)

I use Tomcat 4.1.18, Java 1.4.1_01, Windows XP, J2EE 1.4.0 - BETA


Viktor Gars

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message