I am building a example web app in tomcat as part of my study. I have tried to use the listener tag in the web.xml file but tomcat throws an expection when it tries to digest the web.xml as it can't parse the listener tag. The exception lists the the dtd entry for the web-app tag and the listener tag is not is even in it. Could this be caused by an old version of Tomcat or an old version of servlet.jar?
It's an old version of servlet.jar. This file must contain web-app_2_3.dtd, otherwise you are in trouble. Of course, old versions of Tomcat may not have the right version of servlet.jar. If you do have the right version of servlet.jar, ensure that it is on Tomcat's classpath.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Joined: Mar 18, 2002
Thanks, I found out my issue was that I had the wrong dtd definition in the web.xml file. The one I have was pointing to servley 2.2, once I change this it all worked fine.