tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volodymyr Sobotovich <>
Subject ServletRequestListener.requestDestroyed is called before request leaves a webapp
Date Tue, 09 Aug 2011 19:55:19 GMT
Hello, everyone.

I think I have found a bug in Tomcat's lifecycle handling of
ServletRequestListener. I'd like to discuss it here before posting.
Tomcat 7.0.19, jdk 1.7.0-b147, Ubuntu Linux 11.04
Steps to reproduce:
1. declare error page for 404 code in web.xml
2. Set location of that page to some servlet (let's call it ErrorServlet)
3. go to any invalid URL in webapp (to cause 404)
4. ErrorServlet is called after requestDestroyed on any registered listener.
This kind of behaviour is not correct in my opinion because it
contradicts to contract of ServletRequestListener.
Also it breaks org.springframework.web.context.request.RequestContextListener
if ErrorServlet uses session-scoped beans.

What do you think about that. Should I post in to Bugzilla?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message