我的 struts-config.xml 中出现以下错误
严重:第 6 行第 16 列解析错误:文档根元素“struts-config”,必须匹配 DOCTYPE 根“form-validation”。org.xml.sax.SAXParseException;systemId: jndi:/localhost/SSH/WEB-INF/struts-config.xml;行号:6;列号:16;文档根元素“struts-config”,必须匹配 DOCTYPE root“form-validaton”
xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN" "http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd">
<struts-config>
<form-beans>
<form-bean name="sform" type="org.apache.struts.action.DynaActionForm">
<form-property name="sid" type="java.lang.String"/>
</form-bean>
</form-beans>
<global-exceptions/>
<global-forwards/>
<action-mappings>
<action path="/sidSubmit" name="sform"
type="org.springframework.web.struts.DelegatingActionProxy"
scope="request"
input="/search.jsp">
<forward name="search" path="/search.jsp"/>
</action>
</action-mappings>
<message-resources parameter="com.xxx.xxx.Application"></message-resources>
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/studentContext.xml"/>
</plug-in>
</struts-config>