• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

listener tag in web.xml

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic