Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Document root element

843838Nov 9 2006 — edited Nov 10 2006
When starting Sun One Application Server 7 I get the following error in the console:

SEVERE ( 5028): ContextConfig[ROOT] Parse error in application web.xml
org.xml.sax.SAXParseException: Document root element "web-app", must match DOCTYPE root "null".

What does this error mean and how do I fix?

My web.xml file:
<?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      http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  version="2.4">
  <display-name>My appliation</display-name>
  <description>My appliation</description>

  <context-param>
    <param-name>log4j-file</param-name>
    <param-value>WEB-INF/log4j.properties</param-value>
  </context-param>

  <listener>
    <listener-class>
      com.gh.web.listener.Listener
    </listener-class>
  </listener>

  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <jsp-config>
    <taglib>
      <taglib-uri>/tags/common</taglib-uri>
      <taglib-location>/WEB-INF/tld/common.tld</taglib-location>
    </taglib>
  </jsp-config>
</web-app>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 8 2006
Added on Nov 9 2006
3 comments
352 views