Terrance Davis wrote:

> What happens in the class/bean "userBean" when <jsp:setProperty name="userBean" 
>property="user" param="username" /> is invoked?
>

What is happening is that JSP is using the Java "reflection" API (part of the standard 
JDK) to look at your bean's class and
determine what properties it has that follow the usual JavaBeans setXxxxx naming 
convention.  Then, it checks the parameters that
came in with each request.  For each name match, it calls your setXxxxx method for 
that property.

>
> What method is being invoked in the class/bean? What methods/properties should exist 
>in order for this to work?
>

Just the setXxxxx methods for the properties you want to have set from the request 
parameters.  For other reasons you will want
the getXxxxx methods as well, but they are not used to process the <jsp:setProperty> 
element.

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to