CORE3282: stdout: org.xml.sax.SAXParseException: the root element of the document "taglib" must match the DOCTYPE root "null",

I get below error in one of my applications -

  CORE3282: stdout:
  org.xml.sax.SAXParseException: Document root element "taglib", mustmatch  DOCTYPE root "null"

An application has only one servlet with only one web.xml and pom.xml.

web.xml =======

<?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">

<web-app>
    <display-name>Test</display-name>
    <description>Test Servlet</description>

    <servlet>       
        <servlet-name>open</servlet-name>
        <servlet-class>com.test.openRateServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>open</servlet-name>
        <url-pattern>/email</url-pattern>
    </servlet-mapping>

</web-app>

Is this problem due to a mismatch between my web application and tomcat version?

+5
source share
2 answers

Try using below

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_3.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_3.xsd" version="2.3">
0
source

I have the same problem that I configured tomcat inside my eclipse, but when I start my tomcat using terminal, it just worked after a minute.

0
source

All Articles