1st Is that the right way to go and 2nd
I query in the bean and am able to get the resultSet back to the
servlet but not back to a
jsp page.
Here is what I have so far.
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String tableName = "";
try {
tableName = request.getParameter("table");
db.setTable(tableName);
db.connect();
rs=db.viewItems();
request.setAttribute("theResult", rs);
}
catch(Exception e) {
e.printStackTrace();
}
ServletContext sc = getServletContext();
String url = "/loop.jsp";
RequestDispatcher rd = sc.getRequestDispatcher(url);
request.setAttribute("theResult", joe);
rd.forward(request, response);
}
Can someOne please show me where I'm going wrong. I have looked in a few books and a few webSites but I haven't seemed to find any examples of this.
Any help is greatly apreciated