tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: response.isCommited() returns false after sendRedirect is called?
Date Fri, 23 Dec 2011 08:55:28 GMT
2011/12/23 Polina Genova <polina.genova@gmail.com>:
> Hi,
>
> I accidentally noticed that in valves response.isCommitted()  returns false
> after sendRedirect() is called.
> According to the HttpServletResponse API (and Servlet Specification v.2.5)
> after sendRedirect() is called the response should be considered committed
> so I believe isCommitted() should return true in this case, shouldn't it?
> Reproducible on Tomcat 6.35.
>
> To reproduce this, you may use the attached test materials:
>            - test dummy valve
>            - simple test app with 2 jsps (test.jsp redirects to index.jsp).
>

The spec says about HttpServletResponse.isCommitted(), but your valve is calling
org.apache.catalina.connector.Response.isCommitted().

Those are different methods.

See o.a.c.connector.ResponseFacade#isCommitted() and Response.isAppCommitted().

Best regards,
Konstantin Kolinko

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


Mime
View raw message