• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get the selected option from req.getParameterValues

 
Preetha Shenoy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i have only one select, i usually use an array and get the selected option string by this way
defaultArray[Integer.parseInt(request.getParameter("defaultList"))-1]

But now i have several lists (around 300) and req.getParameterValues for these selects only gioves me the selected option number(0, 1 or 2)
How do i get the selected description?
 
Preetha Shenoy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I changed the option value in the jsp to read as the option description, instead of value ="1", value = "2" etc and it solved my problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!