I was about to write that getPrintWriter isn't called until the first buffer is
flushed.  out is a JspWriter, not a PrintWriter.  So you can set headers even
after writing some content to out.  You can even forward the request after
writing some content.

But that doesn't help the encoding support.  Unless the JspWriter buffer is a
char[] buffer.  I'd assumed that JspWriter was responsible for the encoding, so
its buffer is a byte[] buffer.

Scott Ferguson
Caucho Technology

Hong Zhang wrote:

> It will be too late when you get a chance to call setContentType since
> the PrintWrite object out has already created. The only way to do this
> with 1.0 spec, I believe, is to use a JSP super class. In the service
> method of the super class, you may call setContetType before calling the
> method _jspService. However, I don't believe this is an appropriate
> solution, and, as it has mentioned serveral time in the spec, that
> introducing a JSP super class is something you should be very careful.
> Hong Zhang
> [EMAIL PROTECTED]

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to