• 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

Tomcat listener tag

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I have written a context listener and ported it under the web-inf/classes folder.
While declaring it in the web app using <listener> tag the tomcat complains of
PARSE error at line 60 column 15
org.xml.sax.SAXParseException: Element type "listener" must be declared.
Can anyone let me know where the problem is.
Abhinav Mathur
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
post code
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Even i was facing same problem
with one of my applications
I had made 2 mistakes
1. listerner should be configured even
before the element servlet. Please
refer the web.xml dtd for exact
order of various elements in web.xml
2.Since listeners are introduced in
servlet spec v 2.3, if your web.xml
is pointing to older dtds it will create
problem

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
if its '2.2' instead of '2.3' it will not work

Hope this helps
 
reply
    Bookmark Topic Watch Topic
  • New Topic