facebook

Error in web.xml… [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #200302 Reply

    grzelakc
    Member

    I’m getting a weird error in my web.xml. Eclipse shows the following message in the task box:
    Error The markup declarations contained or pointed to by the document type declaration must be well-formed. web.xml mpi/web/WEB-INF line 1

    here’s the web.xml in question:

    <?xml version=”1.0″ ?>
    <!DOCTYPE web-app PUBLIC
    “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”
    http://java.sun.com/j2ee/dtds/web-app_2_3.dtd”&gt;

    <web-app>
    <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/classes/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>3</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>3</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>

    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>

    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>

    <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>

    <taglib>
    <taglib-uri>/WEB-INF/displaytag.tld</taglib-uri>
    <taglib-location>/WEB-INF/displaytag.tld</taglib-location>
    </taglib>

    <taglib>
    <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>

    </web-app>

    I have no idea why it complains about my web.xml is there anything wrong with it?

    #200304 Reply

    Try to select an encoding within the xml tag:

    <?xml version=”1.0″ encoding=”UTF-8″?>

    I think this will do it. If not keep on complaining 😉 Maybe you can also create a new WEB project and check the web.xml and try to substitute some elements of it until it stops/starts complaining.

    Hope this helps,

    Martin (Kersten)

    #200318 Reply

    support-michael
    Keymaster

    Change your document declaration to use the URI below. The URI you specified is obsolete.

    <!DOCTYPE web-app PUBLIC
    “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”
    http://java.sun.com/dtd/web-app_2_3.dtd”&gt;

    For fun click this link http://java.sun.com/j2ee/dtds/web-app_2_3.dtd.

    Thanks Martin. I followed your lead and diff’ed w/ the web.xml of a working helloworld webapp project’s web.xml.

    Good luck.

    Michael
    MyEclipse Support

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Error in web.xml… [Closed]

You must be logged in to post in the forum log in