This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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 ]
Joined: Nov 05, 2001
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.