Fixed it.
Apparently I needed to add the following code to the doEndTag method:
try
{
// get the current bodyContent for this tag and write it to the
original JSP writer
pageContext.getOut().print(bodyContent.getString());
}
catch(IOException e)
{
throw new JspException(e.getMessage());
}
Catharine
----- Original Message -----
From: "cbarnes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 23, 2002 11:27 AM
Subject: TEI classes for custom tags
> I am writing a number of custom tags, all of which return a list of string
> values to the JSP by using a TEI class.
> I want to write a generic TEI class that can be used by all the custom
tags.
> This TEI class needs to be supplied with a list of attribute names that it
> has to create VariableInfo objects for. The tag classes have this list of
> attribute names as a tag attribute, so I thought that I could get this
list
> from the TagData object in the TEI class by doing something like:
> Vector listOfAttributes = (Vector)data.getAttribute("attributeNames");
>
> However, this doesn't appear to work. I get a ClassCastException trying to
> cast the object to a Vector.
>
> Can anyone tell me if its possible to get this to work?
>
> Is there a better way of supplying a list of attribute names to the TEI
> class.
>
> Am I going to have to give in and write a different TEI class for each of
> the custom tags?
>
> Thanks,
> Catharine
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com