Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing Multiple Values to another jsp page from a List Box

 
hari krishnakumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i want to pass multiple values from a list box from one jsp page to another jsp page.
can anyone tell me how to get the values in the another page using request?
 
Jon Chan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a quick and dirty method:
pass it as follows:
.....&list=abc|def|ghi&...........
And then use StringTokenizer to handle the value.
 
Nischal Tanna
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ..
to pass multiple values of a single parameter we can use the getParametervalues() method of the request object
for example suppose the name of the list is "list1"
use the following syntax at the 2nd page..
String[] values=request.getParametervalues("list1");
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic