Dear Craig,

Thank you for your respond. That does help to explain it.
It seems then, to me, the 'reflection' take place around
the "Submit" event, when "Submit" button is pressed, right ?

If, at the "Submit" time, I'd  like to do all the cross-checking
of these request parameters, as well as to write their values
into a file, how could I do it ?

Would I do that in a method "setSubmit()" [no passed argument]
in the class NumberGuessBean ?

Thanks again.

---Nam

Craig McClanahan wrote:

> 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



--
Nam D. Nguyen
QC Data Ltd.
PDS Dept.
(403) 716-3477
email: [EMAIL PROTECTED]
---
"A polar bear is a rectangular bear after a coordinate transform." - anon.

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