是的,struts-config.xml
根据模式是无效的,但随着应用工作,这只是一个验证问题。要在扩大为什么它是在子元素的顺序上下文无效 - 如果验证器告诉你......
元素类型“的struts-config”的内容必须匹配 “(????数据源,形豆,全球转发,动作映射“)
...那么这意味着,例如(减少为了简洁的例子):
<struts-config>
<datasource>...</datasource>
<form-beans>...</form-beans>
<global-forwards>...</global-forwards>
<action-mapping>...</action-mapping>
</struts-config>
...是模式的有效实现,而例如...
<struts-config>
<datasource>...</datasource>
<global-forwards>...</global-forwards>
<form-beans>...</form-beans>
<action-mapping>...</action-mapping>
</struts-config>
...不是。顺便说一下,这是因为Struts 1.0 DTD in question说...
<!ELEMENT struts-config (data-sources?,form-beans?,global-forwards?,action-mappings?)>
......并由此要求子元素的某种顺序。这是不是该DTD作者做不经意,但由于事实:
声明在DTD发生限制无序列表将 往往导致很长的或复杂的看着声明。 1