struts2 validate

来源:百度知道 编辑:UC知道 时间:2024/05/22 14:05:34
请问一下struts-config文件中,validate标签的用法!!!
谢谢

validate=true

除了action中validate="true"
还要在下面配置<plug-in/>
具体如下:
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>