Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTPRequest & Multiple selections in a ListBox

 
Shankar Ganesh
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If multiple entries in a list box are selected, how can these selected values be accessed from the Servlet Request? Would the selection come as an array?
 
rkjhaver
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when u get the value from a multiple selected list box it will
all selected values with a delimiter as ','.
such that u can use stringtokenizer and divide the parts
hope it will work..
bye,
Rajesh Jhaver
 
Shankar Ganesh
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it... I too found the format by tring an example. Thanks anyway, Rajesh, for the response.
 
Danny Mui
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also use the getParameterValues() function call in the javax.servlet.http.HttpServletRequest (inherited from javax.servlet.ServletRequest).
Using this call will return an array of Strings which is nice and clean .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic