AFAIK attributs are string only. You might want to use the PageContext
getAttribute/setAttribute to pass this type of information into and out of
a tag. PageContext attributes are not the same as tag attributes. Also, I
think <%= %> only prints strings. You could also use the HttpSession
Attributes if you want your bean to last past this page. A tag gets passed
the PageContext and PageContext can be used to get at the HttpSession.
--Angus Mezick
Jill Foley wrote:
>
> 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