Hi,
I suppose you have a session runing if you`re in your servlet. Simply
append your array to that session (can't remember the method name, but
it's simple to find in javadocs). After forwarding to jsp you have
access to the same session you previously accessed in your servlet. You
can simply get the array (or whatever datastruct) and start your
processing.
Be carefull with directly using the ResultSet object as datatransfer
object. I think a ResultSet is not guranteed to live forever as it
depends on a connection which may be timeouted somewhen.
Peter
----- Original Message -----
From: "Kwan, William" <[EMAIL PROTECTED]>
Date: Tuesday, November 20, 2001 8:52 pm
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:
> Resources: http://java.sun.com/products/servlet/external-
> resources.htmlLISTSERV 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