On 10/01/2012 14:31, Polina Genova wrote: > Hi Konstantin, > > You previously said: >> The spec says about HttpServletResponse. >> isCommitted(), but your valve is calling >> org.apache.catalina.connector.Response.isCommitted(). > > But org.apache.catalina.connector.Response implements HttpServletResponse. > Don't you think it should conform with the spec (HttpServletResponse API) > then?
So does org.apache.catalina.connector.ResponseFacade. When you do Response.getResponse() you get a ResponseFacade, just like an application does, with a different implementation. So call that one instead. p Thanks and Best Regards, > Polina > > > On Mon, Dec 26, 2011 at 12:44 AM, Polina Genova > <polina.gen...@gmail.com>wrote: > >> Thanks for the answer, Konstantin, >> >> Actually I was referring to the HttpServletResponse interface simply >> because org.apache.catalina.connector. >> Response implements it and I would expect that its isCommited() >> implementation complies with it just like ResponseFacade's one does. >> >> Thanks! >> >> Best Regards, >> Polina >> >> On Fri, Dec 23, 2011 at 10:55 AM, Konstantin Kolinko < >> knst.koli...@gmail.com> wrote: >> >>> 2011/12/23 Polina Genova <polina.gen...@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-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >>> >> > -- [key:62590808]
signature.asc
Description: OpenPGP digital signature