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 5224] New: - Can't declare listeners in web.xml
Date Sat, 01 Dec 2001 21:55:06 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5224>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5224

Can't declare listeners in web.xml

           Summary: Can't declare listeners in web.xml
           Product: Tomcat 4
           Version: 4.0 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: edburns@acm.org


According to the Servlet 2.3 SPEC, this is a correct specification for a 
listener:

<web-app>
<display-name>MyListeningApplication</display-name>
<listener>
<listener-class>com.acme.MyConnectionManager</listener-class>
</listener>
<listener>
<listener-class>com.acme.MyLoggingModule</listener-class>
</listener>
<servlet>
<display-name>RegistrationServlet</display-name>
...etc
</servlet>
</web-app>

However, when I do this in my web.xml, I get this error on startup:
Starting service Tomcat-Standalone
Apache Tomcat/4.0
PARSE error at line 11 column -1
org.xml.sax.SAXParseException: Element "web-app" does not allow "listener" here.

Starting service Tomcat-Apache
Apache Tomcat/4.0

What is the correct way to declare a listener?

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


Mime
View raw message