what method are you using to get the parameters?
If you use request.getParameter("key") it will only return the first value
(this is in the servlet 2.2 spec).
Try request.getParameterValues("key") which will return an array of strings
that contain all of the params with the value "key" in the HTTP header. If you
are already doing this, reinstall/get a new servlet container!

Tim Panton wrote:

> (I was asked to post this question here by a co-worker - Tim)
>
> Dear all,
>
> I've got a problem with a HTML form that uses multiple parameters with
> the same name. When I do a POST, somehow only the first parameter is
> passed on to me, NOT all parameters.
>
> I think, but I'm not sure, that the problem lies with the Apache
> Webserver. This problem did not occur when I was testing with the
> servletrunner.
>
> I've tried it with:
> - Netscape 4.61 on Linux (RedHat 6.0)
> - IE 5 on W2000
>
> We use the Apache HTTP Server Version 1.3 on Linux (RedHat 6.0).
>
> I have to rewrite my forms into the following
>
> <form method="POST" action="...">
> Start Date
>  <input type=text name="startDateDay" value="01" size=3 maxlength=2>dd
>  <input type=text name="startDateMonth" value="05" size=3 maxlength=2>mm
>  <input type=text name="startDateYear" value="1970" size=5
> maxlength=4>yyyy
> <input type="submit" value="Go">
> </form>
>
> because with this form
>
> <form method="POST" action="...">
> Start Date
>  <input type=text name="startDate" value="01" size=3 maxlength=2>dd
>  <input type=text name="startDate" value="05" size=3 maxlength=2>mm
>  <input type=text name="startDate" value="1970" size=5 maxlength=4>yyyy
> <input type="submit" value="Go">
> </form>
>
> I only get the value of the first inputfield (the day) returned instead
> of all three values. All 3 fields are filled in, however.
>
> The above is a workable workaround, but I'm getting in real problems
> when
> I want to use a multiple selectable list. What I'm doing at the moment
> is generating a huge list of checkboxes. It looks awful.
>
> I'm a bit puzzled since, however hard I search, I cannot find any
> mention of this problem:
> I've searched the Apache website (mailing list archive & bug list), I
> read the Apache User's Guide, searched the archives of this mailing list
> and searched the javasoft's bug database.
>
> Does anyone have a clue what this might be?
> Any help is appreciated!
>
> Thanks,
>   Birgit
>
> ps
> Could you email me personally, since I don't read the mailing list
> regularly: [EMAIL PROTECTED]
>
> ___________________________________________________________________________
> 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

--
Erik I Morton
Software Developer
------------------
CommerceHub
http://www.commercehub.com
518-886-0704
21 Corporate Drive
Clifton Park, NY 12065

___________________________________________________________________________
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