Try putting it into the session:

HttpSession session = req.getSession( true );//if new session needed
session.setAttribute( "aResultsSet", rs );//will leave the rs open (with
open cursors !)
 RequestDispatcher rd =
getServletContext().getRequestDispatcher("/test/display.jsp");
        rd.forward(request, response);

//then pick up the session within the jsp

Dave


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Kwan,
William
Sent: 20 November 2001 19:52
To: [EMAIL PROTECTED]
Subject: Passing a resultset from a servlet to jsp


Hi,

I tried to put the resultset into an array and send that to the jsp page but
I think I'm doing it wrong. Is there an easier way, like passing the
resultset over??

here some code:
does this set the rsArray to have the data from the resultset??
        request.setAttribute(dbrs.getString(i+1), rsArray);

        RequestDispatcher rd =
getServletContext().getRequestDispatcher("/test/display.jsp");
        rd.forward(request, response);

thanks,
Will

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to