From Servlet to JSP
- by kawtousse
When trying to pass a table built with HTML in my servlet like that:
response.setContentType("text/html" );
PrintWriter out = response.getWriter();
out.println("<html>" );
out.println("<head>" );
out.println("<title>Imput OPC</title>" );
out.println("</head>" );
out.println("<body>" ); ...
and then
response.sendRedirect("/xxx.jsp" );
But I did not found any table in the JSP.
A friend told me to use a Bean but how can i catch values from the form ( because I have a treatement with the form before constructing table)in a bean.I must use a servlet for that.
So what I want is exactly to construct in the response a table then send it to jsp knowing that:
.sendRedirect and getServletContext().getRequestDispatcher("/xxx.jsp").forward(request, response); gives nothing at all.
Please Help its urgent.
Thinks.