Why do I get the error. org.xml.sax.SAXParseException : Element type "web-app" must be declared. when starting my web application? It has a web-app element already!

Alessandro A. Garbagnati

The XML DOCTYPE headers are missing from your web.xml file.

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
Or...Is WEB-INF all capital case (sorry if I ask you this question, but this could be one cause of the problem).

[Note that this error would not cause a problem in some older servlet engines. Specifically, I'm pretty sure Tomcat 3 was not so strict. This is a "gotcha" when upgrading from Tomcat 3 to Tomcat 4. -Alex C]

About | Sitemap | Contact