Methods Summary |
---|
public void | attributeAdded(javax.servlet.ServletContextAttributeEvent event)Record the fact that a servlet context attribute was added.
// --------------------------------------------------------- Public Methods
log("attributeAdded('" + event.getName() + "', '" +
event.getValue() + "')");
|
public void | attributeRemoved(javax.servlet.ServletContextAttributeEvent event)Record the fact that a servlet context attribute was removed.
log("attributeRemoved('" + event.getName() + "', '" +
event.getValue() + "')");
|
public void | attributeReplaced(javax.servlet.ServletContextAttributeEvent event)Record the fact that a servlet context attribute was replaced.
log("attributeReplaced('" + event.getName() + "', '" +
event.getValue() + "')");
|
public void | contextDestroyed(javax.servlet.ServletContextEvent event)Record the fact that this web application has been destroyed.
log("contextDestroyed()");
this.context = null;
|
public void | contextInitialized(javax.servlet.ServletContextEvent event)Record the fact that this web application has been initialized.
this.context = event.getServletContext();
log("contextInitialized()");
|
private void | log(java.lang.String message)Log a message to the servlet context application log.
if (context != null)
context.log("ContextListener: " + message);
else
System.out.println("ContextListener: " + message);
|
private void | log(java.lang.String message, java.lang.Throwable throwable)Log a message and associated exception to the servlet context
application log.
if (context != null)
context.log("ContextListener: " + message, throwable);
else {
System.out.println("ContextListener: " + message);
throwable.printStackTrace(System.out);
}
|