• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get the whole list table / dropdown data from html/jsp in servlet?

 
Winston Liek
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to get the list/ values in html/jsp from servlet?

I have a table inside an html/jsp page and when the user clicks a button I need to refresh the whole page with some additional text message.

Currently what I am doing is that I am using a java bean for the jsp page that contains a list of values inside the table then store it in session but I think there is a better way without storing it in session.

I tried using request.getParameter() but it only returns string.
 
Praful Thakare
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried using request.getParameter() but it only returns string.


yes, because its read only map (for servlet developer) used by container to store request/form parameters. you can use request.setAttribute and request.getAttribute.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65533
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For information that needs to be retained over multiple requests, there is nothing wrong with using the session. Just be sure to remove it from the session after it is no longer needed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!