DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5413>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5413 JspWriterImpl causes, under certain circumstances, an IllegalStateException when releasing the PageContext ------- Additional Comments From [EMAIL PROTECTED] 2001-12-13 12:12 ------- I knew I hadn't seen the last of the problems related to sendRedirect, and sendError! :( The root of the problem is jasper does not known that they are being called, so it is the user's responsibility to make sure that write or flush never got called again after a call to sendRedirect or sendError, including the write's or fluses generated by Jasper! It is either that, or we'll have to change the Servlet spec so that sendRedirect, and sendError never returns (i.e. they should throw an exception of some sort). There are limits to what Jasper can do to hide the problem. This is one that it can do nothing about. The proposal to check if response has been committed in initOut would not work, because if getWriter is not called, "out" would be null, and you are going to get a NullPointerException later. The fact is by the time it get to initOut, it is already too late. Write should not have been called in the first place! Should we check if response is commited on every call to write? That would be very costly! How can the user be sure that write never got called after sendError? Make sure that there is always a return after a call to sendError, and a return after a call to methods that calls sendError (e.g. sendFail in the test), etc. If you think this is error-prone and too much to asked from the user, you are right, but I already said the spec should be changed. I'll probably close this one as INVLAID (since the test can be rewritten to get it to work), or WONTFIX (since there is no fix); but I'll leave it open for a couple of days, to let people argue it out. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>