This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Is this a limitation of JSP ?- I can do it in ASP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is this a limitation of JSP ?- I can do it in ASP" Watch "Is this a limitation of JSP ?- I can do it in ASP" New topic
Author

Is this a limitation of JSP ?- I can do it in ASP

kris isfeld
Greenhorn

Joined: Mar 20, 2001
Posts: 5
I have a form which has:
1. A select box
2. Multiple text boxes with the same name.
Can I get all the values from the select box?
Can I get all the values of the text boxes - I seem to get only the first one declared back.
ASP returns an array of values in both cases but I can't figure out how to do this from JSP.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi there.
Bhupinder Dhillon
Ranch Hand

Joined: Oct 12, 2000
Posts: 124
Originally posted by kris isfeld:

ASP returns an array of values in both cases but I can't figure out how to do this from JSP.

String textValues[] = request.getParameterValues("textBoxName");
Daniel Olson
Ranch Hand

Joined: Jan 05, 2001
Posts: 81
Here is something you can do to see everything that is passed:
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Is this a limitation of JSP ?- I can do it in ASP
 
Similar Threads
preselecting value in select box when it is populated using ajax
Need suggestions and help for my scenario in struts
Passing Parameters through JSP
jsp + dropdown + automatically populate the vales from the db in the Text box
Operations between two select boxes