All my doEndTag() for simple tags ( other than the iteration tags with Body) did return SKIP_PAGE. But changing them to EVAL_PAGE (sounded like what was wrong ) did not help me.
My TagHandler Class looks like this .
/******************************************************
import java.io.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class HelloTagSupport extends TagSupport {
private
String name;
public void setName(String name)
{
this.name=name;
}
public int doStartTag() throws JspException {
try {
pageContext.getOut().println(" Using the Tag Support Interface "+name);
} catch (IOException ioe) {
throw new JspException("Error: IOException while writing to client" + ioe.getMessage());
}
return SKIP_BODY;
}
public int doEndTag() throws JspException {
return EVAL_PAGE;
}
}
********************************************/
In my tag library descriptor(hello.tld) I have a list of tags. Is this something wrong ?
My Tld
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<!-- a tag library descriptor -->
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>first</shortname>
<uri></uri>
<info>A simple tab library for the
examples</info>
<tag>
<name>hello</name>
<tagclass>com.adspedia.gui.framework.tags.HelloTag</tagclass>
<bodycontent>empty</bodycontent>
<info>Say Hi</info>
</tag>
<tag>
<name>helloSupport</name>
<tagclass>com.adspedia.gui.framework.tags.HelloTagSupport</tagclass>
<bodycontent>empty</bodycontent>
<info>Tag with Parameter</info>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<tag>
<name>tolowercase</name>
<tagclass>com.adspedia.gui.framework.tags.ToLowerCaseTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>To lower case tag</info>
</tag>
<tag>
<name>loop</name>
<tagclass>com.adspedia.gui.framework.tags.LoopTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>Tag with body and parameter</info>
<attribute>
<name>times</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
In my JSP page I use the same prefix for all these tags .
Lakshmi
Appreciate your time .
Lakshmi