This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a HTML form which displays a select drop-down list.I am using the "GET" method.
After the form is submitted I would like to retrieve the value selected in the drop down box within the servlet.
How do I do this?
Thanks in advance.
Jahnavi if I am not mistaken, you must have done something like this
Now you just have to use request.getParameter("mySelect"); and it will return the value of the selected option. Remember it will not return Servlet or JSP or Struts, it will return the value attribute of the option tag i.e. either 1,2 or 3...