tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: no notification when incorrect classes are specified in web.xml
Date Thu, 06 Jun 2002 17:23:27 GMT


On Thu, 6 Jun 2002, tek1 wrote:

> Date: Thu, 06 Jun 2002 01:56:55 -0400
> From: tek1 <tek1@pobox.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: no notification when incorrect classes are specified in web.xml
>
> does anyone know which catalina class is responsible for loading the
> servlet and filter classes specified in the web.xml file?
>

The loading class depends on which application class you're talking about:
* Servlets - org.apache.catalina.core.StandardWrapper
* Filters - org.apache.catalina.core.ApplicationFilterConfig
* Listeners - org.apache.catalina.core.StandardContext

> i've noticed that when i start tomcat that tomcat gives no notification
> when the classes, specified in web.xml (i.e. <filter-class> or
> <servlet-class>), are not valid.
>
> if possible, i would like to fix this problem, i feel that it would be
> better if the class loader printed out a message when tomcat starts that
> the specified servlet/filter could not be found.
>

To do these checks at startup time, you'd probably want to add the
additional logic to the start() method in
org.apache.catalina.core.StandardContext - this is called as an
application is being started up, and would be the right time to log the
messages you are talking about.  From here you also have access to all of
the configuration information you need, via the
findApplicationListeners(), findFilterDefs(), and findChildren() methods.
The latter one gives you a Wrapper for each servlet definition.

If you come up with a patch that adds this functionality, could you please
post it as an attachment to an "Enhancement Request" in the bug tracking
system?  That way, a Tomcat committer can evaluate and apply it.

  http://nagoya.apache.org/bugzilla/

Craig McClanahan



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


Mime
View raw message