Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing a ResultSet from a servlet  RSS feed

 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I was just curious, is it possible to send a ResultSet from a Servlet to a JSP? If so how is this done?

Thanks in advance

Zein
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any java object can be bound to request, session, or context scope and read in a JSP.
People ususally process the resultset in the servlet or bean and pass a lighter, more generic object like a an arrayList or a plain old java array.

JSPs shouldn't need to import any of the java.sql packages.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!