GD wrote:
> JavaDocs for getOutputStream() and getWriter() methods say that they should
> throw "java.lang.IllegalStateException - if the getOutputStream method has
> already been called for this response object"
>
> But when you do forward (from jsp), Weblogic is calling getWriter() method
> again (second time) on the same response object, calling resetBuffer()
> before.
>
> Is it a mistake in the documentation or Weblogic is not doing it according
> to the specs? What specs say about that?
>
> I want to know because I am subclassing HttpServletResponseWrapper and it
> isn't clear from the docs how it should behave in this situation.
>
> Thanks!
>
>


Hi,

I'm not sure whether your question already got answered in another
group. So i'll continue with my Q & A anyway

Which version sp of weblogic are you using? The behavior of WLS has been
to always use getOutputStream() throughout the container. There was a
bug in 70sp1, i think where getWriter() was being called *only from a
ResponseWrapper* and it has hence beein fixed in sp2.

Given that you have your HttpServletResponseWrapper, the wls container
will call getOutputStream() and write byte data to it. I agree with the
lack of clarity in the spec and hope that it gets resolved in the
servlet.next revision.

HTH
Nagesh