Re: Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-05-04 Thread Dave Cherkassky
Chris, you are 100% right. I got caught up in my own assumptions. When I examined Tomcat's generated java class, I saw code like this: out.print( ); My typical naming convention is to use out as a variable for OutputStream. But of course that's not the case here -- out is a Writer!

Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-05-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 5/1/2009 5:34 PM, Mark Thomas wrote: Long story short. Old error handling: Reset the response. Leave usingWriter flag alone. New error handling: Reset the buffer. Reset usingWriter flag. Gotcha. You're right: I hadn't read /everything/

Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-05-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, On 5/4/2009 12:36 PM, Dave Cherkassky wrote: My typical naming convention is to use out as a variable for OutputStream. But of course that's not the case here -- out is a Writer! Yup. Now, upgrade! ;) You can tell your politicians that TC

Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-05-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, On 4/29/2009 10:41 PM, Dave Cherkassky wrote: 1) I agree with you for includes and forwards, but for errors? I would have thought that the definition of error is that something went wrong, and Tomcat should start from scratch and just

Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-05-01 Thread Mark Thomas
Folks, As I replied a couple of days ago. This is almost certainly a known Tomcat issue. http://markmail.org/message/dmsf24ppd2nopvnz Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional

Re: Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-05-01 Thread Dave Cherkassky
Chris, Your interpretation is correct. I am not having any troubles with headers. So I think that this line of investigation is a dead end. Thanks, -- Dave Cherkassky VP of Software Development DJiNN Software Inc. 416.504.1354 Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE-

Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-04-30 Thread Pid
Dave Cherkassky wrote: PID, thanks for your insight. Two comments about that: 1) I agree with you for includes and forwards, but for errors? I would have thought that the definition of error is that something went wrong, and Tomcat should start from scratch and just render the error

Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-04-29 Thread Dave Cherkassky
A long question: First, I have a Servlet that writes to response.getOutputStream(). Here's a snippet: public class AuditTrailServlet extends HttpServlet { public void doGet( HttpServletRequest request, HttpServletResponse response ) response.setContentType( application/vnd.ms-excel );

Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-04-29 Thread Mark Thomas
Dave Cherkassky wrote: Yes, I know -- I *am* using Tomcat 4.1 (rather than the latest and greatest) for various legacy and political reasons. But my question is this: - Is this a known bug? Or am I doing something wrong with either the servlet, the web.xml or with the jsp page? That

Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-04-29 Thread Dave Cherkassky
PID, thanks for your insight. Two comments about that: 1) I agree with you for includes and forwards, but for errors? I would have thought that the definition of error is that something went wrong, and Tomcat should start from scratch and just render the error page. I didn't think of it as

Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-04-29 Thread Len Popp
There's no possible way for Tomcat to start from scratch. If some data has already been sent to the client, it can't be called back to the server. What's sent is sent. Typically, the HTTP response is buffered because the JSP handler does that automatically. So if an error occurs before the