• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

data from servlet to jsp

 
ganesh narayana
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have nearly 500 records in a resultset, which is generaged by a servelt, now i want to display all this 500 records using a jsp.

please tell me how to pass this data to a jsp, and how to receive information in jsp.

thanku....
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you store all of these values in a List of row beans, you can bind the list to request (or session) scope and then iterate through the list using JSTL.
 
Ben Zung
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand then -- you can get the resultset (with 500 rows) from the servlet, what prevents you from getting it directly from the JSP?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben_zr ung:
what prevents you from getting it directly from the JSP?


Writing good code?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ben_zr ung",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Ben Zung
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear, hope this is not a violation of the rule now with my middle name zr omitted.
Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Middle name would be fine. It was the underscore that was the problem. Thanks for adjusting.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic