Hi Java gurus,
Can some on give me any suggestion on how to forward a Result from servlet to jsp.
I am using JSWDK1.0. I have a servlet that accesses a database and generates a ResultSet (rs). This rs is stored in a Vector (vec) and forword to a jsp file. However, I get 404 Error.
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
// the codes generates the ResultSet rs, vec is a Vector
//str_requestDispatch_url_1 is jsp file path , eg /examples/jsp/Present_RS.jsp
//config is an object of ServletConfig, defined in init() of the servlet
vec.addElement(rs);
request.setAttribute("vec", vec);
RequestDispatcher rd = config.getServletContext().getRequestDispatcher(str_requestDispatch_url_1);
rd.forward(request, response);
System.out.println ("Forward *******************************" + str_requestDispatch_url_1 );
Should I store the ResultSet in some javabean and implement <jsp:useBean ..?> in the Present_RS.jsp?
Any suggestion is highly appreciated. Many thanks in advance
Sincerely
J. H
