Mitul,
 
Every property of a bean should have a get method and a set method (that's essentially how a property is defined - by the existence of set and get methods).  Anytime you use a bean, these
methods are used to pass values to the bean, and to retrieve values from the bean. 
 
The 'property="*"' in the line you quote is requesting that JSP read all the parameters passed to it, and
pass every single one of them to the bean myBean.  This means that every parameter in your form MUST
correspond to a property of your bean.  Since properties are defined by the existence of set and get methods, you need to make sure that these exist.
 
-AMT
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of mitul
Sent: Wednesday, December 01, 1999 12:48 AM
To: [EMAIL PROTECTED]
Subject: how to pass multiple parameters to a bean.

Hi everyone,
    i am trying to pass multiple form parameters which are there in the request.getParameter collection of the jsp page to a bean which must have the methods defined to return the values to be displayed on the page. The example with one form field works fine but when i try to post the form with more than one form field i get the error  
 
    Method for reading < surname >  not found , where surname is the name of the text field.
 
  1. Do i have to write individual set and get methods for each parameter passed.
  2. What does property="*" in the following code imply
            <jsp:useBean id="mybean" scope="page"  class="hello.NameHandler" />
            <jsp:setProperty name="mybean" property="*" />

Thanks in advance
 
Mitul  

Reply via email to