Sounds to me that you have to get what you want to set from the request and
use introspection to find the corresponding set methods of the bean
properties you want to set. time to look up reflection APIs...
With those two lines mybean will already have the values from the request if
there's corresponding public accessor methods for them.
> -----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