3 Replies Latest reply on Jul 15, 2005 9:09 AM by theute

    Problem in web.xml file

    kannaiyanbalaji

      Hi all,
      I was trying to deploy my webapp. I am getting this error:

      Parser Error at line 5 col 16 Document root element "web-app", must match DOCTYPE root "null"

      My web.xml file is as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
      version="2.4">

      <servlet-name>ListenerTester</servlet-name>
      <servlet-class>com.example.ListenerTester</servlet-class>

      <servlet-mapping>
      <servlet-name>ListenerTester</servlet-name>
      <url-pattern>/ListenTest.do</url-pattern>
      </servlet-mapping>
      <context-param>
      <param-name>breed</param-name>
      <param-value>Great Buddy</param-value>
      </context-param>

      <listener-class>com.example.MyServletContextListener</listener-class>

      </web-app>

      I am not sure what is the error with this. Can somebody help me out.

      Thanks
      Balaji