ExampleServlet ExampleServlet ExampleServlet /example The LoggingListener will be notified first, followed by the DBConnectionPoolListener instance. When the web application shuts down, the listeners are notified in reverse order. The HttpSessionevent listeners are notified prior to listeners for the application context. 15.2.4.3 Packaging the event listener The packaging of the event-listener classes follows the guidelines described in the previous section for filters. That is, the classes must either be in the WEB-INF/classes directory or be installed in a JAR file located in the WEB-INF/lib directory for the web application. 15.3 Jakarta Commons Logging The Commons Logging package is an open source Logging library that allows developers to use a common logging API, while maintaining the freedom to use many different third-party logging implementations. The Commons Logging API insulates the application and protects it from becoming coupled to a specific logging implementation. The API provides a small set of Java classes and interfaces that an application imports and relies upon but that has no implicit dependencies on any one logging product. The Logging library allows developers to declaratively configure the logging implementation; the library will dynamically discover which implementation is being used. An application that uses the Commons Logging API does not have to be modified when the logging implementation is changed. This is the greatest benefit of such a package. The Commons Logging package supports several logging implementations out of the box: log4j (http://jakarta.apache.org/log4j) JDK 1.4 Logging LogKit (http://jakarta.apache.org/avalon/logkit) SimpleLog (writes log messages to stdoutand stderr) NoOpLog (log messages are ignored) The Commons Logging package includes only the and implementations; it does not contain the other third-party logging implementations. You will need to download those separately.
Visit our
web design programs services for an affordable and reliable webhost to suit all your needs.
This entry was posted
on Saturday, November 17th, 2007 at 8:02 pm and is filed under Domain.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.