My understanding is that any method signatures which match form input parameter
names will be called within the bean with the value of the corresponding form
parameter. I am not sure if case is significant. The asterisk means "call any
bean setter methods for attributes which match form input parameter names".

Eg; if your bean has;
public String getName()
public void setName( String )
public int getColour()
public void setColour( int )

Then if your jsp is called with form parameters containing;
name="zaphod"
colour=turquoise

then the setName() method of myBean shall be called with the value "zaphod", and
the setColour method shall be called with the value "turquoise". I am not sure
if this works only with Strings, I do not know (off of the top of my head, would
be easy to test) whether if you had;
int getAge() and void setAge( int age), whether or not the setAge() method would
be called with any equivalent form parameters automatically converted to ints
(although my hunch is ... probably not).

Hope this helps,

regards

Dave Young


____________________Reply Separator____________________
Subject:    can someone explain this trivial thing...?
Author: Leon Andrews <[EMAIL PROTECTED]>
Date:       17/01/2000 17:07

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="*" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>can someone explain the significance of the asterix

in the second line of the code below?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The tutorial I am using does not explain
it.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>many thanks,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Leon.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&lt;jsp:useBean id="mybean" scope="session"
class="hello.NameHandler" /&gt;<BR>&lt;jsp:setProperty name="mybean"
property="*" /&gt;</FONT></DIV></BODY></HTML>

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