Leon,
 
The asterisk in the second line of code is a wildcard character and tells JSP to take all of the parameters sent to the page and set the properties in the bean with these parameters. It is simpler and quicker than having to set all of the properties individually.
 
For example the JSP page may be called as shown
 
myJSPfile.jsp?paramOne=someValue&paramTwo=someOtherValue
 
Using the * character would cause the following parameters to be set in the bean
 
 public void setparamOne(String strVal) {
     paramOne= strVal;
 }
 public void setparamTwo(String strVal) {
     paramTwo= strVal;
 }
-----Original Message-----
From: Leon Andrews [mailto:[EMAIL PROTECTED]]
Sent: Monday, 17 January 2000 17:07
To: [EMAIL PROTECTED]
Subject: can someone explain this trivial thing...?

Hi,
 
can someone explain the significance of the asterix in the second line of the code below?
 
The tutorial I am using does not explain it.
 
many thanks,
 
Leon.
 
<jsp:useBean id="mybean" scope="session" class="hello.NameHandler" />
<jsp:setProperty name="mybean" property="*" />

Reply via email to