Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

ResultSet JSP Display Recommendation

  Asked By: Lorraine    Date: Aug 07    Category: Java    Views: 1491
  

I'm looking for some of your recommendations on what the best method
is for returning a ResultSet from a Java class that will be displayed
on a JSP. The JSP would instantiate an object of this class, call a
method, and get a ResultSet in return. The issue, obviously, is I
cannot close the connection until after use in the JSP. Ideally I'd
like to close the connection and preparedStatement (etc.) right away
as that seems the proper thing to do.

How have some of you handled this in the past? Do you call a
separate close method after displaying the table/grid? Do you
convert the RS to an arraylist, vector, map, etc? If so, would you
be willing to provide links or examples as to why one would choose
one type over another?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on ResultSet JSP Display Recommendation Or get search suggestion and latest updates.




Tagged: