If you set propertyName to * then the tag will iterate over the
current ServletRequest parameters, matching parameter names
and value type(s) to property names and setter method type(s), setting
each matched property to the value of the matching parameter. If a
parameter has a value of "", the corresponding property is not
modified.
----- Original Message -----
From: Rakesh Bhat <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 04, 2000 8:37 PM
Subject: Re: Syntax of setproperty
> Hi,
>
> As i understand , setProperty sets the value of an attribute in a bean.
> i.e attribute=value (just like a constructor).
>
> when u do
> <jsp:setProperty name="myBean" property="*"/> ,
>
> it meant to say that , set all attributes .
> My doubt is , "set the attribute values to what?".
> There is no value argument at all.
>
> Also , there is no doubt the that attributes need to be of same data
type.
>
> Hope i am putting it clear.
>
> Thx
> Rakesh.
>
>
>
>
>
> Tamanna Kher wrote:
>
> > Hi!!!!
> > This statement sets all the properties in the bean i.e. lets say in the
> > bean we have 5or 10 set methods setName, setId, setAddress, setAge etc
> > etc...... Instead of calling each set method seperately we say
> > <jsp:setProperty name="myBean" property="*"/>
> > Provided the parameter name being passed, the setProperty name and the
> > parameter being set are same.
> >
> > Rakesh Bhat <[EMAIL PROTECTED]> on 07/04/2000 07:56:03 PM
> >
> > Please respond to A mailing list about Java Server Pages specification
and
> > reference <[EMAIL PROTECTED]>
> >
> > To: [EMAIL PROTECTED]
> > cc: (bcc: Kher Tamanna-SWD-ITIL-UB/Itilmail)
> >
> > Subject: Re: Syntax of setproperty
> >
> > In this context , could anyone tell me what does following statement
does ?
> >
> > <jsp:setProperty name="myBean" property="*"/>
> >
> > Thx
> > Rakesh
> >
> > Hans Bergsten wrote:
> >
> > > Paras Sharma wrote:
> > > >
> > > > hello
> > > >
> > > > can some one tell me the syntax of set property of bean in JSP
> > > > i have bean as mybean with method as
> > > > setMethod(String str) {...}
> > > > thanks in advance
> > >
> > > I'm not sure if this is what you ask for, but you can use the
> > > <jsp:setProperty> action to set a bean property. With your example,
> > > it could look like this:
> > >
> > > <jsp:useBean name="myBean" class="com.company.MyBean" />
> > > <jsp:setProperty name="myBean" property="method" value="Hello!" />
> > >
> > > The <jsp:useBean> action creates the bean, <jsp:setProperty> sets the
> > > property.
> > >
> > > For information about syntax and how to use JSP, I recommend that you
> > > buy a book and/or read the specification online:
> > >
> > > <http://java.sun.com/products/jsp/>
> > >
> > > Hans
> > > --
> > > Hans Bergsten [EMAIL PROTECTED]
> > > Gefion Software http://www.gefionsoftware.com
> > >
> > >
> >
===========================================================================
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > > http://java.sun.com/products/jsp/faq.html
> > > http://www.esperanto.org.nz/jsp/jspfaq.html
> > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets