This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes *listener*  *listener-class* Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "*listener*  *listener-class*" Watch "*listener*  *listener-class*" New topic
Author

*listener* *listener-class*

Ryan Bailey
Ranch Hand

Joined: Feb 26, 2002
Posts: 134
I seem to be having a problem. Here is the following error that I'm getting.


I'm sure I have the proper <web-app> format.
My listener is the first element to be declared under <web-app> then it's <servlet>, <servlet-mapping>, <welcome-file-list>, <error-page>, resource-ref>. If I comment out the listener element everything works fine. Does anyone have any suggestions? My listener is define as follows:

I usually have great advice with tomcat but this had me confused. I'm using tomcat 4.1.
Regards,
Ryan
[ May 08, 2003: Message edited by: Mike Curwen ]

SCJP 1.4, SCWCD
Java: The power, elegance, and simplicity of a hand grenade
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

In your listing of what tomcat expects in web-app, I don't see any listeners declarations. Could you have made your web.xml file based on the servlet 2.2 spec ?
Ryan Bailey
Ranch Hand

Joined: Feb 26, 2002
Posts: 134
Sorry about this screwed up post. I am sure you are correct. This is an old webapp file.
<!DOCTYPE web-app
PUBLIC"-//Sun Micorsystems, Inc. //DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
The current Servlet Spec is 2.4 correct? Do I just change the link to sun in order to reference 2.4?
Thanks in advance for your time.
Cheers,
Ryan
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

The current servlet spec is still 2.3. 2.4 is in 'proposed final draft 3'

You're using a version of Tomcat that supports 2.3, so I'd look into the example's web.xml file for the exact dtd string to use.
Ryan Bailey
Ranch Hand

Joined: Feb 26, 2002
Posts: 134
Thanks for the reply Mike. I looked into my root webapp and do see the 2_3 I need to use.
Cheers,
Ryan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: *listener* *listener-class*
 
Similar Threads
problem in tomcat something digester.Digester fatalError
Tomcat Start-up error when using JSF 1.1/1.0
addChild: Child name 'jsp' is not unique
strange tomcat behavior
exception in deploying my webapp in tomcat4.1