HTML: <input type="hidden" name="myHidden" value="value1" /> <input type="hidden" name="myHidden" value="value2" /> <input type="hidden" name="myHidden" value="value3" />
Java: String[] values = request.getParameterValues( "myHidden"); String val1 = values[0]; String val2 = values[1]; String val3 = values[2]; Cheers! Mark -----Original Message----- From: Chen, Gin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 5:14 PM To: [EMAIL PROTECTED] Subject: Using request.getParameterValues Hi all, I have a POST form on my page with a hidden param. On submit of the page, I want to set this param to have multiple values. I have been able to do this with a javascript string concat to set the value of it and then from the server side use request.getParameter("myhidden") to get the value. But since it has multiple values, I find that I have to use StringTokenizers and such to get the value from it. I would much prefer to use the request.getParameterValues method but I dont know how to get the page to send the paramter values separately. I've tried to use the param=value¶m=value as my string but (of course) that doesnt seem to work. Has anyone ever tried to send multiple hidden values to the Server without having to use GET equests? Is there a better/cleaner way to do this? -Tim ___________________________________________________________________________ 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
