• 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

ServletContextListener Deployment

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.
I have created a ServletContextListener and placed it in my classes directory. I have added the entry into the deployment descriptor but am getting the error message:
PARSE error at line 7 column 14
org.xml.sax.SAXParseException: Element type "listener" must be declared.
Heres mt descriptor code:
<listener>
<listener-class>DBContextListener</listener-class>
</listener>
Any ideas?
Thanks in advance
Oh yeah. I am using Tomcat
[ June 04, 2002: Message edited by: Caveman Thomas ]
 
Dave Thomas
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In case anyone is interested I found the problem.
I changed my DTD to this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
and removed <description> and <display-name> tags.
Also, the listener tags must come before the servlet tags.
reply
    Bookmark Topic Watch Topic
  • New Topic