Hi, I'm a new user using Tomcat 5.0 on W2K. I'm going through some tutorials and am having trouble adding listeners where I want them. Below my webapps/WEB-INF/classes directory I have a com/jspbook directory. I have a number of servlets in the jspbook directory that work fine. As soon as I add a listener I get a "NoClassDefFoundError". Here is a snippet from the log file:
2003-11-17 07:57:37 SessionListener: contextDestroyed() 2003-11-17 07:57:37 ContextListener: contextDestroyed() 2003-11-17 07:57:37 SessionListener: contextDestroyed() 2003-11-17 07:57:37 ContextListener: contextDestroyed() 2003-11-17 07:57:46 ContextListener: contextInitialized() 2003-11-17 07:57:46 SessionListener: contextInitialized() 2003-11-17 07:57:46 Error configuring application listener of class com.jspbook.SiteLogger java.lang.NoClassDefFoundError: com/jspbook/SiteLogger (wrong name: SiteLogger) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) ...... Here is how it is defined in the web.xml file - (it is the first entry after web-app, and yes it is in the jspbook directory): <listener> <listener-class>com.jspbook.SiteLogger</listener-class> </listener> If I move this to the default classes directory and change the listener definition to the following *it works fine*: <listener> <listener-class>SiteLogger</listener-class> </listener> I've tried several different directories, directory levels, etc. but I can only get it to work in the default classes directory. I've compared it to the jsp-examples structure and web.xml file used here, but I cannot see what is being done differently. My gut says I haven't uncommented something or configured something correctly but I'm not sure what. Any help would be appreciated. Thanks in advance, Ken --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]