出錯的信息大概有以下一些:
The content of element type "action-mappings" must match "(action)*".
The content of element type "struts-config" must match "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*
Element type "action" must be followed by either attribute specifications, ">" or "/>".
=====================================================================
解決的辦法:
①struts-config.xml中的配置順序:
1、display-name
2、description
3、data-sources
4、form-beans
5、global-exceptions
6、global-forwards
7、action-mappings
8、controller
9、message-resources*
10、plug-in*
②關於順序不對:
<set-property property="" value="true" />
<forward name="" path="/index.jsp" />
注意他們都在<action></action>的裏面。
③關於空格的問題
<action name="" path="" scope="request" type="">
<forward name="" path=""></forward>
</action>
name、path、scope、type之間一定要有空格。
學識淺薄,希望能幫到出錯的初學者。