I'm trying to pass a resultset from my
servlet to a
jsp page.
I'm able to pass Strings, but I can't get the resultset to display on my JSP page.
This is the code in my servlet (I think this line is causing the problems):
results = stmt.executeQuery(sql);
req.setAttribute("pagerrs", results);
This is the code in my jsp:
ResultSet rs = (ResultSet) request.getAttribute("pagerrs");
while( rs.next() ){
out.println( rs.getString("firstname_txt") );
}
Nothing prints out, and I don't get an error. And I know that the query does return results.
Any ideas?