A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Web Component Certification (SCWCD/OCPJWCD)
IllegalStateException does not happen. Why not?
Joined: Aug 10, 2005
Aug 10, 2005 15:55:00
According to HFSJ, I should get an
if I redirect or dispatch the request after writing to the response. But that is not happening.
response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("test"); out.flush(); response.sendRedirect("/anotherURL.jsp");
No exceptions occur. The sendRedirect statement is simply ignored.
If I remove the flush() line, then it gets redirect but still without the exception.
It is sorta covered in the
JavaRanch Style Guide
subject: IllegalStateException does not happen. Why not?
B&S 2.2.2 - Unlock()
Help needed, in Servelet
servlet: No return method after rd.forward?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013