You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeff Turner <je...@socialchange.net.au> on 2001/04/17 07:29:56 UTC

TC4: "Element type X is not declared."

Perhaps this should be in a FAQ:

When migrating to TC4, I discovered a number of webapps gave errors like:

PARSE error at line 8 column -1
org.xml.sax.SAXParseException: Element type "web-app" is not declared.

and

PARSE error at line 11 column -1
org.xml.sax.SAXParseException: Element type "taglib" is not declared.


It turns out this is because the DOCTYPE definition was missing from my web.xml
AND *.tld files.

For web.xml, you need:

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

or 2.3 instead of 2.2.

For *.tld, you need:

<!DOCTYPE taglib
        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
	"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">


--Jeff