I've got a small web app that's working just fine. As soon as I add a listener, 
it fails to deploy.

Here's the relevant part of web.xml:

<?xml version="1.0" encoding="UTF-8"?>
 
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4">
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>net.fender.bazaar.struts.BazaarMessageResources</param-value>
  </context-param>
  <listener>
    
<listener-class>net.fender.bazaar.servlet.BazaarServletContextListener</listener-class>
  </listener>

And the VERY simple listener:

package net.fender.bazaar.servlet;
 
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
 
class BazaarServletContextListener implements ServletContextListener {
 
    private ServletContext context;
 
    public void contextDestroyed(ServletContextEvent event) {
        context = null;
    }
 
    public void contextInitialized(ServletContextEvent event) {
        context = event.getServletContext();
    }
}

And the server log:
INFO: Removing web application at context path /bazaar
Feb 11, 2005 11:16:37 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL 
file:C:\java\jakarta-tomcat-5.0.28\conf\Catalina\localhost\bazaar.xml
Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors

I'm using Tomcat 5.0.28 and Sun JDK 1.4.2_06-b03.

Any ideas?
TIA 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to