• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending information from Servlet to JSP

 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a basic question. I'm writing a basic application that uses a servlet to query a database, and then I want to extract the info from the ResultSet, I want to send it all to a JSP page. My question is how do I get a bunch of records from the Servlet to the JSP page. I'll probably be getting about 1500 records from the Database. Is there a way to send an array of information from the servlet to the JSP?
Thanks for any help.
 
Chad McGowan
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, you just use request.setAttribute(). You can pass any object to the jsp (List, Map, ResultSet, etc.).
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic