Hi
1. no there are no limitations on no. of params on the form.

2. if u are planning to retrieve only one value then there is no point
doing "getParameterValues" u should be using only "getParameter"

3. U could have made typo while entering name="..."

4. to get the default value - dont put anything in value and let user
enter what they want, say if the user left it empty, when ur servlet does
"getParameter" it should see if the value returned was empty - then put your
default in it.

Mittal.

----- Original Message -----
From: "Foudili Kacem" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 14, 2000 5:06 AM
Subject: Strange behaviour? getParameter again :-)


> Hi all,
>   Sorry if this topic was discussed before. It will be great if somebody
>   can help me.
>
>   I have a form with something like 60 textField and one button:
>   <FORM NAME="myform" ACTION=http://localhost/servlet/updater METHOD=POST>
>
>   <INPUT type=text size=12 maxlength=10 name="fld0" value="1.0000">
>   ...
>   <INPUT type=text size=12 maxlength=10 name="fld34" value="1.00">
>   ....
>   <INPUT TYPE=SUBMIT NAME=update VALUE="Update">
>   </FORM>
>
>
>   I want to save the new (double) values entered in the text fields.
>   My questions are :
>
>   1- Is there any limitation in the number of parameters in a form ?
>   2- I had a strange behaviour using the getParameter method :
>
>   1.00 is the default value. I enter 24 as new value.
>   when I call getParameter("fld34") it returns 1.00 , 24 !!! ( so my
>   method to convert it to a double value doesn't work )
>
>   And when I use getParameterValues("fld34") it return an array of two
>   elements 1.00 and 24 !!
>   All I want is to get new entered value ...
>   Is there a clean way to do it ??
>
>   Thanks a lot.
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to