Eclipse 自动生成的 struts-cinfig.xml 失误
Eclipse 自动生成的 struts-cinfig.xml 出错
使用Eclipse的新建struts项目以后自动回生成相应的 struts-config.xml.
但是不知道什么原因,程序可以正常运行,但是在tomcat启动的时候,控制台老报如下错误:
Document root element "struts-config", must match DOCTYPE root "null"
经过检查以后,发现在自动生成的配置文件中,所有配置都正确,但是只有在增加了如下内容才能解决这个问题:
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
不知道是不是偶然.具体原因还有待考证.