Nam Nguyen wrote:

> Hi all,
>
> I'm running a jswdk-1.0 jsp-example that includes 2 files:
>
> numguess.jsp and
> NumberGuessBean.java (for the class NumberGuessBean, of course)
>
> In the class NumberGuessBean, there defines the method:
>
> public void setGuess(String guess)
>
> but I could not find  in the jsp or java files anywhere this
> function is invoked !!! How could th jsp file process the string
> input by the name "guess" ??
> [snip]

> <jsp:setProperty name="numguess" property="*"/>

This line causes the JSP page to use Java reflection to look at the underlying
class (NumberGuessBean) to see what method names it supports.  It then calls the
appropriate "set" method for all property setters for which there is a request
parameter present.


> [snip]

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