"Praveen Kumar S ." wrote:
>
> Hi,
>
> I would just like to state the specs of JSP
>
> The getProperty & setproperty can take only strings, they have to be sent
> strings, and should return strings
>
> this is http specisific
>
> Hope this clears up a bit,

I'm afraid this isn't correct. The JSP 1.1 spec, in section 2.13.2, says
you can use setProperty to set property values of any type, e.g. using the
value attribute with a request-time expression.

But there are restrictions on the types a String value can be converted to.
Since HTTP parameters are always Strings, these restrictions affects the
type of properties that can be set using the param attribute.

Read the spec for all details.

Anyway, the original message from Kevin (below) describes what I consider to
be a bug in JSWDK-1.0. I suggest you try it in the upcoming JSP reference
implementation being developed in the Jakarta project, see
http://jakarta.apache.org. If it's a problem in this version as well, either
look at the source code and try to figure out why and submit a patch, or
report it as a bug on the Jakarta mailing list.


> > -----Original Message-----
> > From: Kevin McEntee [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, November 25, 1999 2:16 AM
> > To:   [EMAIL PROTECTED]
> > Subject:      Overloading Bean Setter and JSP Introspection
> >
> > I have a bean where I have two setter functions with the same name but
> > different argument types.
> >
> > setShoeStartDate( String startDate )
> > and
> > setShoeStartDate( Date startDate )
> >
> > I have a form element: <input type='text' name='shoeStartDate'>
> >
> > The bean introspection using jswdk-1.0 does not cause either of the
> > setShoeStartDate functions to be called.  Only if I eliminate the
> > setShoeStartDate function that takes a Date object will the
> > setShoeStartDate function that takes a String argument get called.
> >
> > Is this expected behavior?  Is overloading bean setter functions just a
> > bad idea?
> >
> > - Kevin
> >
> > ==========================================================================
> > =
> > 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
>
> ===========================================================================
> 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


--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

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