Hello,
I am facing a strange problem with my custom jsp tags.
First my environment: JBoss3.03/Jetty and JDK1.3.1_07 under Linux and
Windows
This is my custom tag source:
public class DocumentIteratorTag extends BodyTagSupport {
private int counter = 0;
private Vector all;
private PageContext pageContext;
public DocumentIteratorTag() {
}
public void setPageContext(PageContext pageContext) {
this.pageContext=pageContext;
}
public int doStartTag() throws JspException{
all =
(Vector)pageContext.getSession().getAttribute(Constants.ATTRIBUTE_DOC_LIST);
counter = 0;
if ( all != null && counter < all.size() ) {
System.out.println("count total:"+all.size());
}
if ( all != null && all.size() > 0 ) {
return EVAL_BODY_TAG;
}
else {
return SKIP_BODY;
}
}
public void doInitBody() throws JspException{
System.out.println("doInitBody");
if ( all != null && counter < all.size() ) {
DocumentInfo docInfo = (DocumentInfo)all.get(counter);
pageContext.setAttribute("bwc.documentinfo", docInfo);
counter ++;
}
}
public int doAfterBody() throws JspException {
if ( all != null ) {
if ( counter < all.size() ) {
DocumentInfo docInfo = (DocumentInfo)all.get(counter);
pageContext.setAttribute("bwc.documentinfo", docInfo);
return EVAL_BODY_TAG;
}
else {
try {
getBodyContent().writeOut( getPreviousOut());
getBodyContent().clear();
} catch( java.io.IOException ioe) {
// User probably disconnected ...
// Log and throw a JspTagException
}
}
}
return SKIP_BODY;
}
}
When I run my application I get the following exception:
java.lang.NoClassDefFoundError: javax/servlet/jsp/JspContext
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getDeclaredMethods(Class.java:1034)
at java.beans.Introspector$1.run(Introspector.java:847)
at java.security.AccessController.doPrivileged(Native Method)
at
java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:845)
at java.beans.Introspector.getTargetEventInfo(Introspector.java:551)
at java.beans.Introspector.getBeanInfo(Introspector.java:289)
at java.beans.Introspector.getBeanInfo(Introspector.java:76)
at
org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:147
)
much more goes here
I have found out that the
pageContext.setAttribute("bwc.documentinfo", docInfo);
is causing the problem. When I remove this from my code then it works.
The same application runs without any problems in a Tomcat4x and Tomcat5
server.
Any ideas?
WBR
Andreas
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user