• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to pass list box element values form jsp

 
GaneshKumar Kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I have a list box in my jsp file. When the user click the submit button, the id and value of all the elements in the list box should be passed to next jsp. In the next jsp I have to get the same in the next jsp and use it Can it be done by using Javascript or any otherway? If you have idea please let me know.


Thanks
Ganesh
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Ganesh,

you can put the id's and values in a Map, and put the Map in session-scope (if id's and values are the same for every user, you could even put them in application-scope)

Herman
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you submitting directly to the JSP? If so you don't need to do anything but access the values by name with request.getParameterValues()
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!