I am using the Spring MVC <form:select> tag in my JSP and have populated the values in it.
How can I retrieve the selected value from the select box and use it for further operations?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can obtain them in the controller to which you submit. For example:
This assumes you have a converter from
StringtoFoo. Otherwise you can simply useStringas argument.If you want to get the whole form submitted to a javabean, make a bean with fields named exactly the same as the fields in your html form, and pass it as argument to the handling method.