Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E747C7725 for ; Tue, 9 Aug 2011 19:56:08 +0000 (UTC) Received: (qmail 56836 invoked by uid 500); 9 Aug 2011 19:56:08 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 56770 invoked by uid 500); 9 Aug 2011 19:56:07 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 56761 invoked by uid 99); 9 Aug 2011 19:56:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 19:56:07 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of wheleph@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qy0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 19:55:59 +0000 Received: by qyk31 with SMTP id 31so277063qyk.18 for ; Tue, 09 Aug 2011 12:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=7/GbwMawxmwTtBhN3D35v9QwOa/nl0S9OJ5n16oCq0c=; b=DElipX2uSDMQpXdiR6y/9cAAtoPfhVc3SlOr7jFAGolpIRL8EZ5yQtebawArwOke8Y BV6fDIdIrAuJfMdXbrjegAmdVhZR474O7oGAEAzMH7jJvs3sg0VYjxnYGtYZiaGbuCGd YWr9ZqQFmBpDazSrCIrkfcPv8Es9I0Ja1AJk0= Received: by 10.229.43.156 with SMTP id w28mr5527092qce.164.1312919739113; Tue, 09 Aug 2011 12:55:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.148.212 with HTTP; Tue, 9 Aug 2011 12:55:19 -0700 (PDT) From: Volodymyr Sobotovich Date: Tue, 9 Aug 2011 22:55:19 +0300 Message-ID: Subject: ServletRequestListener.requestDestroyed is called before request leaves a webapp To: dev@tomcat.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org 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: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org