From Servlet to JSP
Posted
by kawtousse
on Stack Overflow
See other posts from Stack Overflow
or by kawtousse
Published on 2010-04-21T10:29:14Z
Indexed on
2010/04/21
10:33 UTC
Read the original article
Hit count: 274
jsp
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.
© Stack Overflow or respective owner