现在的位置: 首页 > 综合 > 正文

org.xml.sax.SAXParseException: The markup in the document following the root element must be well-fo

2013年02月05日 ⁄ 综合 ⁄ 共 396字 ⁄ 字号 评论关闭

部署项目报错:org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.

此句的一看就是xml文件的错,文档中标记的地方格式不合法,通不过dtd的验证,所以要符合规范,在xml文件的开头加上

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

这样就符合规范了。

抱歉!评论已关闭.