This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

 
Ranch Hand
Posts: 194
  • 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.
 
Ranch Hand
Posts: 645
  • 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.
 
Marshal
Posts: 67273
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!