忽略可返回驗證錯誤的已命名 Struts 操作的 input 屬性是錯誤的。
不論已命名操作是否返回驗證錯誤,Struts 規范均要求包含 input 屬性[2]。input 屬性可指定驗證錯誤出現時用來顯示錯誤消息的頁面。
例 1:以下配置定義了已命名的驗證操作,但未指定 input 屬性。
<action-mappings>
<action path="/Login"
type="com.LoginAction"
name="LoginForm"
scope="request"
validate="true"/>
</action-mappings>
[1] Apache Struts 1.3 Specification
[2] struts-config_1_3.dtd