I am accessing a db in a servlet and want to display all the rows of a table in a jsp, to divide the presentation from the logic. Essentially I want to pass an object (ResultSet rs) from the servlet to the jsp, so within the jsp I can call something like:
< tr>
while(rs.next())
< td>< %=Record.firstfield%>< /td>
< td>< %=Record.secondfield>< /td>
< /tr>
I am unclear on the use of a directive (syntax < @ page...%>
to import the needed packages as well as the classes and objects (like the ResultSet) instantiated in a separate servlet held in the same container.
I corrected the table stuff to prevent display problems.
[This message has been edited by Carl Trusiak (edited December 12, 2001).]
< tr>
while(rs.next())
< td>< %=Record.firstfield%>< /td>
< td>< %=Record.secondfield>< /td>
< /tr>
I am unclear on the use of a directive (syntax < @ page...%>
to import the needed packages as well as the classes and objects (like the ResultSet) instantiated in a separate servlet held in the same container.
I corrected the table stuff to prevent display problems.
[This message has been edited by Carl Trusiak (edited December 12, 2001).]