You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Colin Sampaleanu <co...@exis.com> on 2004/03/24 16:36:23 UTC

NoClassDefFoundError: javax/servlet/jsp/JspContext when trying to use JSP taglib

I'm trying to use one of the jsp tags in a JSP page to generalte a link 
to some tapestry pages. What is really weird is that on trying to insert 
a tag, JBoss 3.2.3/TomCat 4.xx gives the following error on trying to 
compile the page:

javax.servlet.ServletException: javax/servlet/jsp/JspContext
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
	at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
	at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
....

*root cause*

java.lang.NoClassDefFoundError: javax/servlet/jsp/JspContext at 
java.lang.Class.getDeclaredMethods0(Native Method) at 
java.lang.Class.privateGetDeclaredMethods(Class.java:1647) at 
java.lang.Class.getDeclaredMethods(Class.java:1131) at 
java.beans.Introspector$1.run(Introspector.java:1126) at 
java.security.AccessController.doPrivileged(Native Method) at 
java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1124) 
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:989) at 
java.beans.Introspector.getBeanInfo(Introspector.java:370) at 
java.beans.Introspector.getBeanInfo(Introspector.java:144) at 
java.beans.Introspector.getBeanInfo(Introspector.java:205) at 
java.beans.Introspector.(Introspector.java:351) at 
java.beans.Introspector.getBeanInfo(Introspector.java:144) at 
org.apache.jasper.compiler.Generator$TagHandlerInfo.(Generator.java:1946) 
at 
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1093) 
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:707)
...


All I'm doing in inserting the tag as follows:

<%@ taglib uri="/WEB-INF/tapestry_1_0.tld" prefix="tapestry" %>
....
  <tapestry:page page="InsertAppVersionBuild"/>

My .tld file is indeed in the /WEB-INF dir, and there is no problem 
until I actually try to use one of the tag, i.e. the taglib declaration 
by itself presents no problem.

Now, as far as I can make out javax.servlet.jsp.JspContext is a J2EE 1.4 
(JSP 2.0) class. I don't think this version of TomCat even includes that 
class, and as far as I can tell, the Tapestry build is not compiling 
againt the J2EE 1.4 / JSP 2.0 libs anyways. Using Tapestry 3.0RC1 from 
Jakarta, or using my own build from CVS, makes no difference.

Does anybody have an idea as to what is going on? Has anybody used the 
taglibs with JBoss/TomCat recently?

Regards,
Colin



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: NoClassDefFoundError: javax/servlet/jsp/JspContext when trying to use JSP taglib

Posted by Mindbridge <mi...@yahoo.com>.
I think the code is using the new JSP APIs that are available in Tomcat 5,
but not in Tomcat 4 or earlier.
Your solution is clearly the way to resolve the problem. I guess we need to
check if there is a way to make things work with earlier versions of the
API.

----- Original Message ----- 
From: "Colin Sampaleanu" <co...@exis.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, March 24, 2004 7:26 PM
Subject: Re: NoClassDefFoundError: javax/servlet/jsp/JspContext when trying
to use JSP taglib


> Figured out this issue too. My servlet was not in the standard /app
> location, and I wasn't setting the proper location with the 'servlet'
> attribute to the tag. What is weird is that there was absolutely no
> error logged or thrown. Weird, but at least it's working now.
>
>
> Colin Sampaleanu wrote:
>
> > I got the exception to stop, by removing the existing
> > javax.servlet.jar lib in JBoss/TomCat, and adding in TomCat 5.19's
> > jsp-api.jar and servlet.api.jar. I am confused as to why I should have
> > to do this though, since as far as I can tell Tapestry is compiled
> > against the old version, same as what ships with JBoss.
> >
> > Now I still have an issue that the tags simply put out blank (nothing)
> > as the value for the url. Has anybody actually used these tags lately?
> >
> > Regards,
> > Colin
> >
> > Colin Sampaleanu wrote:
> >
> >> I'm trying to use one of the jsp tags in a JSP page to generalte a
> >> link to some tapestry pages. What is really weird is that on trying
> >> to insert a tag, JBoss 3.2.3/TomCat 4.xx gives the following error on
> >> trying to compile the page:
> >>
> >> javax.servlet.ServletException: javax/servlet/jsp/JspContext
> >>     at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
> >>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >>     at
> >>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
> >>
> >>     at
> >>
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:432)
> >>
> >>     at
> >>
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:356)
> >>
> >>     at
> >>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
69)
> >>
> >>     at
> >>
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:455)
> >>
> >>     at
> >>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
> >>
> >>     at
> >> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
> >>     at
> >> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
> >>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> >>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >> ....
> >>
> >> *root cause*
> >>
> >> java.lang.NoClassDefFoundError: javax/servlet/jsp/JspContext at
> >> java.lang.Class.getDeclaredMethods0(Native Method) at
> >> java.lang.Class.privateGetDeclaredMethods(Class.java:1647) at
> >> java.lang.Class.getDeclaredMethods(Class.java:1131) at
> >> java.beans.Introspector$1.run(Introspector.java:1126) at
> >> java.security.AccessController.doPrivileged(Native Method) at
> >>
java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1124)
> >> at java.beans.Introspector.getTargetMethodInfo(Introspector.java:989)
> >> at java.beans.Introspector.getBeanInfo(Introspector.java:370) at
> >> java.beans.Introspector.getBeanInfo(Introspector.java:144) at
> >> java.beans.Introspector.getBeanInfo(Introspector.java:205) at
> >> java.beans.Introspector.(Introspector.java:351) at
> >> java.beans.Introspector.getBeanInfo(Introspector.java:144) at
> >>
org.apache.jasper.compiler.Generator$TagHandlerInfo.(Generator.java:1946)
> >> at
> >>
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:10
93)
> >> at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:707)
> >> ...
> >>
> >>
> >> All I'm doing in inserting the tag as follows:
> >>
> >> <%@ taglib uri="/WEB-INF/tapestry_1_0.tld" prefix="tapestry" %>
> >> ....
> >>  <tapestry:page page="InsertAppVersionBuild"/>
> >>
> >> My .tld file is indeed in the /WEB-INF dir, and there is no problem
> >> until I actually try to use one of the tag, i.e. the taglib
> >> declaration by itself presents no problem.
> >>
> >> Now, as far as I can make out javax.servlet.jsp.JspContext is a J2EE
> >> 1.4 (JSP 2.0) class. I don't think this version of TomCat even
> >> includes that class, and as far as I can tell, the Tapestry build is
> >> not compiling againt the J2EE 1.4 / JSP 2.0 libs anyways. Using
> >> Tapestry 3.0RC1 from Jakarta, or using my own build from CVS, makes
> >> no difference.
> >>
> >> Does anybody have an idea as to what is going on? Has anybody used
> >> the taglibs with JBoss/TomCat recently?
> >>
> >> Regards,
> >> Colin
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: NoClassDefFoundError: javax/servlet/jsp/JspContext when trying to use JSP taglib

Posted by Colin Sampaleanu <co...@exis.com>.
Figured out this issue too. My servlet was not in the standard /app 
location, and I wasn't setting the proper location with the 'servlet' 
attribute to the tag. What is weird is that there was absolutely no 
error logged or thrown. Weird, but at least it's working now.


Colin Sampaleanu wrote:

> I got the exception to stop, by removing the existing 
> javax.servlet.jar lib in JBoss/TomCat, and adding in TomCat 5.19's 
> jsp-api.jar and servlet.api.jar. I am confused as to why I should have 
> to do this though, since as far as I can tell Tapestry is compiled 
> against the old version, same as what ships with JBoss.
>
> Now I still have an issue that the tags simply put out blank (nothing) 
> as the value for the url. Has anybody actually used these tags lately?
>
> Regards,
> Colin
>
> Colin Sampaleanu wrote:
>
>> I'm trying to use one of the jsp tags in a JSP page to generalte a 
>> link to some tapestry pages. What is really weird is that on trying 
>> to insert a tag, JBoss 3.2.3/TomCat 4.xx gives the following error on 
>> trying to compile the page:
>>
>> javax.servlet.ServletException: javax/servlet/jsp/JspContext
>>     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>     at 
>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) 
>>
>>     at 
>> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432) 
>>
>>     at 
>> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356) 
>>
>>     at 
>> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) 
>>
>>     at 
>> org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) 
>>
>>     at 
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) 
>>
>>     at 
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>>     at 
>> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> ....
>>
>> *root cause*
>>
>> java.lang.NoClassDefFoundError: javax/servlet/jsp/JspContext at 
>> java.lang.Class.getDeclaredMethods0(Native Method) at 
>> java.lang.Class.privateGetDeclaredMethods(Class.java:1647) at 
>> java.lang.Class.getDeclaredMethods(Class.java:1131) at 
>> java.beans.Introspector$1.run(Introspector.java:1126) at 
>> java.security.AccessController.doPrivileged(Native Method) at 
>> java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1124) 
>> at java.beans.Introspector.getTargetMethodInfo(Introspector.java:989) 
>> at java.beans.Introspector.getBeanInfo(Introspector.java:370) at 
>> java.beans.Introspector.getBeanInfo(Introspector.java:144) at 
>> java.beans.Introspector.getBeanInfo(Introspector.java:205) at 
>> java.beans.Introspector.(Introspector.java:351) at 
>> java.beans.Introspector.getBeanInfo(Introspector.java:144) at 
>> org.apache.jasper.compiler.Generator$TagHandlerInfo.(Generator.java:1946) 
>> at 
>> org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1093) 
>> at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:707)
>> ...
>>
>>
>> All I'm doing in inserting the tag as follows:
>>
>> <%@ taglib uri="/WEB-INF/tapestry_1_0.tld" prefix="tapestry" %>
>> ....
>>  <tapestry:page page="InsertAppVersionBuild"/>
>>
>> My .tld file is indeed in the /WEB-INF dir, and there is no problem 
>> until I actually try to use one of the tag, i.e. the taglib 
>> declaration by itself presents no problem.
>>
>> Now, as far as I can make out javax.servlet.jsp.JspContext is a J2EE 
>> 1.4 (JSP 2.0) class. I don't think this version of TomCat even 
>> includes that class, and as far as I can tell, the Tapestry build is 
>> not compiling againt the J2EE 1.4 / JSP 2.0 libs anyways. Using 
>> Tapestry 3.0RC1 from Jakarta, or using my own build from CVS, makes 
>> no difference.
>>
>> Does anybody have an idea as to what is going on? Has anybody used 
>> the taglibs with JBoss/TomCat recently?
>>
>> Regards,
>> Colin
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: NoClassDefFoundError: javax/servlet/jsp/JspContext when trying to use JSP taglib

Posted by Colin Sampaleanu <co...@exis.com>.
I got the exception to stop, by removing the existing javax.servlet.jar 
lib in JBoss/TomCat, and adding in TomCat 5.19's jsp-api.jar and 
servlet.api.jar. I am confused as to why I should have to do this 
though, since as far as I can tell Tapestry is compiled against the old 
version, same as what ships with JBoss.

Now I still have an issue that the tags simply put out blank (nothing) 
as the value for the url. Has anybody actually used these tags lately?

Regards,
Colin

Colin Sampaleanu wrote:

> I'm trying to use one of the jsp tags in a JSP page to generalte a 
> link to some tapestry pages. What is really weird is that on trying to 
> insert a tag, JBoss 3.2.3/TomCat 4.xx gives the following error on 
> trying to compile the page:
>
> javax.servlet.ServletException: javax/servlet/jsp/JspContext
>     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>     at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) 
>
>     at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432) 
>
>     at 
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356) 
>
>     at 
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) 
>
>     at 
> org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) 
>
>     at 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) 
>
>     at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>     at 
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> ....
>
> *root cause*
>
> java.lang.NoClassDefFoundError: javax/servlet/jsp/JspContext at 
> java.lang.Class.getDeclaredMethods0(Native Method) at 
> java.lang.Class.privateGetDeclaredMethods(Class.java:1647) at 
> java.lang.Class.getDeclaredMethods(Class.java:1131) at 
> java.beans.Introspector$1.run(Introspector.java:1126) at 
> java.security.AccessController.doPrivileged(Native Method) at 
> java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1124) 
> at java.beans.Introspector.getTargetMethodInfo(Introspector.java:989) 
> at java.beans.Introspector.getBeanInfo(Introspector.java:370) at 
> java.beans.Introspector.getBeanInfo(Introspector.java:144) at 
> java.beans.Introspector.getBeanInfo(Introspector.java:205) at 
> java.beans.Introspector.(Introspector.java:351) at 
> java.beans.Introspector.getBeanInfo(Introspector.java:144) at 
> org.apache.jasper.compiler.Generator$TagHandlerInfo.(Generator.java:1946) 
> at 
> org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1093) 
> at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:707)
> ...
>
>
> All I'm doing in inserting the tag as follows:
>
> <%@ taglib uri="/WEB-INF/tapestry_1_0.tld" prefix="tapestry" %>
> ....
>  <tapestry:page page="InsertAppVersionBuild"/>
>
> My .tld file is indeed in the /WEB-INF dir, and there is no problem 
> until I actually try to use one of the tag, i.e. the taglib 
> declaration by itself presents no problem.
>
> Now, as far as I can make out javax.servlet.jsp.JspContext is a J2EE 
> 1.4 (JSP 2.0) class. I don't think this version of TomCat even 
> includes that class, and as far as I can tell, the Tapestry build is 
> not compiling againt the J2EE 1.4 / JSP 2.0 libs anyways. Using 
> Tapestry 3.0RC1 from Jakarta, or using my own build from CVS, makes no 
> difference.
>
> Does anybody have an idea as to what is going on? Has anybody used the 
> taglibs with JBoss/TomCat recently?
>
> Regards,
> Colin
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org