I am new to using Servlets and JSP but want to use a Servlet to generate
a result set and then use JSP to display the information. I can generate the
result set okay and redirect to a JSP, using
request.setAttribute("rs",rs);
RequestDispatcher rd = getServletContext().getRequestDispatcher("test.jsp);
rd.forward(request, response);
but how do I use the result set in the JSP page ? I have tried (naively)
<% ResultSet passedrs = getAttribute("rs); %>
but get an error about it needing to be cast.
I have looked through the archive and found information on how to pass the
result set but not how to use it.
Can anybody recommend a good book on using Servlets and JSP to create a
database driven application ?
Any help would be appreciated.
Richard Stedham
British Aerospace Tel: 0181-942-9661
Apex Tower, 7 High Street, New Malden Fax: 0181-942-9771
Surrey KT3 4LH E-Mail: [EMAIL PROTECTED]
England
-------------------------------------------------------------------------------
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html