Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple question about request.getParameter();

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a form posting multiple pieces of data from a multiple select list...

for example: using the GET method, the string would look like this:

receivingPage.jsp?selectList=value1&selectList=value2&selectList=value3

I can do:

String values = request.getParameter("selectList");

out.print(values);

and all I will get is:

value1

What am I doing wrong?

Thanks for any help!
Michael
 

hi

you'd better use the method :

public java.lang.String[] getParameterValues(java.lang.String name)

if a parameter name has more than one value...

manu0
 
selectList=value1
selectList=value2
selectList=value3

I wonder if is it possible to pass many times the same variable with different value as parameter.

if you succeded with that code could you post a snippet for me to view.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top