This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes HTTPRequest & Multiple selections in a ListBox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTPRequest & Multiple selections in a ListBox" Watch "HTTPRequest & Multiple selections in a ListBox" New topic
Author

HTTPRequest & Multiple selections in a ListBox

Shankar Ganesh
Ranch Hand

Joined: Oct 01, 2000
Posts: 34
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

Joined: Jan 08, 2001
Posts: 4
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

Joined: Oct 01, 2000
Posts: 34
Got it... I too found the format by tring an example. Thanks anyway, Rajesh, for the response.
Danny Mui
Ranch Hand

Joined: Dec 14, 2000
Posts: 42
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 .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTPRequest & Multiple selections in a ListBox
 
Similar Threads
Passed SCEA part-1
multiple choice
MULTIPLE select - list box - how to read in servlet
insert checked checkbox into table
Dynamic HTML Multi Select Approach