validate驗證——struts1

一. FormBean驗證 1.在struts的配置文件中指定validate=「true」 2.在FormBean中重寫validate方法,並將錯誤信息保存在ActionErrors的對象errors中,並返回errors對象 3.在jsp中用<html:errors property ="驗證信息的別名" />顯示 二. ActionBean驗證 ActionMessages message
相關文章
相關標籤/搜索