This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes Retrieve Data From A Drop Down Menu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Retrieve Data From A Drop Down Menu" Watch "Retrieve Data From A Drop Down Menu" New topic
Author

Retrieve Data From A Drop Down Menu

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
For example, I have a drop down menu created this way:

with a submit button.
When use a servlet to get what user's selection of choice from this menu, do I code this way:
String cohort = request.getParameter("age");
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61103
    
  66

Did it work when you tried it?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Retrieve Data From A Drop Down Menu