tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Tang" <>
Subject Re: Content Type and RequestDispatcher
Date Sun, 18 Jun 2000 06:48:33 GMT
Hi Nacho.

Thanks for your input.  My notes are inline...

Nacho wrote:

> Hola, Alex:
> > So, my first (somewhat long winded) question is: Is it a bug or a
> > feature that the "response.setContentType()" is ignored when using
> > RequestDispatcher.forward()?
> >
> AFAIK is you have commited part of the response to the client you can
> not set any more headers.. this is direct for include because it by
> definition flush ( commit for the case ) the buffers, and in the case of
> forward , i dont know the spec on this but can be that you have commited
> unadvertly the buffer, set a big buffer size and set autoflush to false,
> and do a try

The thing is that I have set the headers >before< i use the
RequestDispatcher.forward() method.  I'm still not sure why this is
happening.  I'll give your suggestion a try...

> > Also, does anyone know of a way to get around this problem?
> >
> > If you're asking "Why don't you just use RequestDispatcher.include()"?
> > The answer is that there's another bug with
> > RequestDispatcher.include()
> > where the session information is always lost.
> >
> I dont know this , is this bug known to more people? i can follow this
> high volume list every day, apologies if this knowed by everybody...
> Alex can you send a test bed for that bug jsp:include bug or point to
> really broken example please ?
> what version of tomcat and OS are you using ?

Tomcat version 3.1.  I'm not sure if there is more detailed tomcat version
information, however I downloaded from within the last 5
OS Version: Windows NT4 (SP5 and SP4), and Redhat Linux 6.2.
JDK version: Sun JDK1.2.2 for both platforms.

As for an example, Please check out
"".  The war file for the example
can be found at

Thanks a bunch.


> Saludos ,
> Ignacio J. Ortega
> --------------------------------------------------------------------------
> To unsubscribe, email:
> For additional commmands, email:

View raw message