tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44268] New: - Multiple registrations of same ServletContextListener class not possible
Date Fri, 18 Jan 2008 16:42:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44268>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44268

           Summary: Multiple registrations of same ServletContextListener
                    class not possible
           Product: Tomcat 6
           Version: 6.0.14
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: stefan.fleiter@web.de


When I register the same class implementing ServletContextListener twice or more
its' contextInitialized methods only gets called once.

The servlet specifications (2.4 and 2.5) say the conforming container has to 
call the listeners in the same order they are registered in the deployment
descriptor.
The case that one listener class is registered twice is not mentioned
explicitly in the specification, though.

Example:
<listener>
  <listener-class>test.ServletContextListener1</listener-class>
</listener>
<listener>
  <listener-class>test.ServletContextListener2</listener-class>
</listener>
<listener>
  <listener-class>test.ServletContextListener1</listener-class>
</listener>

test.ServletContextListener1 and test.ServletContextListener2 get called,
but test.ServletContextListener1 does not get called again.

Apache Tomcat 5.5.25 has the same bug.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message