Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

listener tag in web.xml

 
michael brosnahan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
michael brosnahan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic