You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eugen Paraschiv <ha...@gmail.com> on 2011/08/08 16:07:01 UTC

Tomcat 7.0.19 overrides the http status code on forward

I'm seeing some strange behavior with a RequestDispatcher forward in Tomcat.
The the exact code doesn't generate the problem on Jetty, so it is probably
related to the servlet implementation.

The problem is as follows: Spring does a forward on an existing
request/response - at which point, the response has the http status code of
404; after the forward, the code is 500.

The actual logic happens in Spring (MVC), at: InternalResourceView -
renderMergedOutputModel. The Spring code does mention that the forwarded
resource is supposed to determine the content type itself, but nothing about
the code being overridden as well.

I'm using Spring 3.0.5 on a JDK 6.0.26.

Any help on this is appreciated. Thanks.

Re: Tomcat 7.0.19 overrides the http status code on forward

Posted by Pid <pi...@pidster.com>.
On 08/08/2011 15:07, Eugen Paraschiv wrote:
> I'm seeing some strange behavior with a RequestDispatcher forward in Tomcat.
> The the exact code doesn't generate the problem on Jetty, so it is probably
> related to the servlet implementation.
> 
> The problem is as follows: Spring does a forward on an existing
> request/response - at which point, the response has the http status code of
> 404; after the forward, the code is 500.
> 
> The actual logic happens in Spring (MVC), at: InternalResourceView -
> renderMergedOutputModel. The Spring code does mention that the forwarded
> resource is supposed to determine the content type itself, but nothing about
> the code being overridden as well.
> 
> I'm using Spring 3.0.5 on a JDK 6.0.26.
> 
> Any help on this is appreciated. Thanks.

Are there any errors in the logs?  Are the various log levels set
appropriately?

A 500 status often also produces a stack trace in the logs.  Does it in
this case?


p


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org