- This topic has 2 replies, 3 voices, and was last updated 21 years, 1 month ago by support-michael.
-
AuthorPosts
-
grzelakcMemberI’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 1here’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”><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?
Martin_KerstenMemberTry 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)
support-michaelKeymasterChange 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”>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 -
AuthorPosts