I think you want to pass your tag an identifier to name the bean but
otherwise you have to get hold of the set method for the property you want
to set and invoke it with reflection.

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Christian Billen
> Sent: Friday, May 26, 2000 8:40 PM
> To: [EMAIL PROTECTED]
> Subject: Calling jsp:setProperty from within custom tag
>
>
> Hello, does anyone know how I could set the property of a bean through
> introspection from within a custom tag?
>
> For example let's say I have the following code in my jsp:
>
> <jsp:useBean id="mybean" class="mypackage.myclass"/>
> <jsp:setProperty name="mybean" property="*"/>
>
> But instead I would like to create a custom tag library like:
>
> <tag:mytag class="mypackage.myclass"/>
>
> and from within that tag, on the doStartTag() I would like to set all the
> properties of 'mybean' using the introspection mechanism.  How could I
> achieve this?
>
> Thanks,
>
> Christian
>
> ==================================================================
> =========
> 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
>

===========================================================================
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