all you need is something in your xml file like:
<attribute>
  <name>attributeName</name>
  <required>{true/false}</required>
  <rtexprevalue>true</rtexprvalue>
</attribute>

by default, <rtexprvalue> is false, which requires your attribute value to be a
fixed string.  i think you only need to deal with TagExtraInfo if you want to do
some validation.

i highly recommend checking out
http://developer.java.sun.com/developer/Books/cservletsjsp/chapter14.pdf for a
great tutorial on custom tags.

ab

>  From:  [EMAIL PROTECTED]
> Date:   09/26/00 03:08 PM
>
>
>
>I'm reading about tag libs and I have a question about
>attributes.
>
>I read "The attribute value is supplied to the method as a
>String".  But then I saw an example of a tag handler for the tag
>
><tlt:twa attr1="value1">
>
>that had:
>
>private AttributeClass attr1;
>setAttr1(AttributeClass ac) {...}
>
>So my question is: can an attribute be any java object?  Can I do
>this?:
>
><mylib:presonHeader param="<%= personBean.getPerson() %>" />
>
>and have a setParam(Person person) in my tag handler?
>
>Thanks
>Jill
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to