The markup in the document preceding the root element must be well-formed

错误:The markup in the document preceding the root element must be well-formed

 

这个错误时我在搭建struts2时遇到的,原因:struts.xml中的dtd标签写错了(我刚开始是手写的)

 

解决办法是:直接复制下面代码:

<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd">

 

 

你可能感兴趣的:(apache,xml,struts)