Hi Reader,
This is the piece of code i have in my
servlet..
RequestDispatcher disp = getServletContext().getRequestDispatcher("/Normal.jsp");
disp.include(req, res);
String sStatus = (String) req.getAttribute("Status");
String name= "";
if (!sStatus.equals("OK")){
res.sendRedirect(sStatus);
}
else{
name = (String) req.getAttribute("Name");
}
When the status is not 'Ok' it basically throws an illegal state exception. I guess the response is committed. But how to get rid of this scenario.
What should i do so that i can include a
JSP file in my servlet and eventually i can use forward or redirect to another JSP ? Is there really a way to work it out ?
Thanks in advance guys
Suren