文件名称:struts_validator
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.29mb
- 下载次数:
- 0次
- 提 供 者:
- wuxia*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
struts validator验证框架
1、配置:
* 加入国际化配置在struts-config.xml文件中,如:
<message-resources parameter="MessageResources" />
* 提供国际化资源文件
* 引入validator插件在struts-config.xml文件中,如:
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>
* 提供validation.xml和validator_rules.xml文件,将此文件拷贝到WEB-INF下
2、validator服务器端验证
* 配置validation.xml文件
3、validator客户端验证(javascr ipt)
) * 配置validation.xml文件
* 在jsp页面中包含< html:javascr ipt>
* 对需要验证的表单定义onsubmit事件,其中事件名称为validate+ActionForm的名称,如:validateLoginForm -struts validator to verify the fr a mework 1, configuration:* join the international allocation in the struts-config.xml file, such as: <message-resources parameter= MessageResources />* International* The introduction of resource file validator plug-in struts-config . xml file, such as: <plug-in className= org.apache.struts.validator.ValidatorPlugIn > <set-property property = pathnames value = /WEB-INF/validator-rules.xml,/WEB-INF/validation.xml /> </ plug-in>* provide validation.xml and validator_rules.xml document, copy this file to the WEB-INF under 2, validator server-side validation* validation.xml configuration file 3, validator client-side validation (javascr ipt))* configuration file* validation.xml in jsp page contains <html: javascr ipt>* on the need to verify the definition of the form onSubmit incident, in which case the name of validate+ ActionForm name, such as: validateLoginForm
1、配置:
* 加入国际化配置在struts-config.xml文件中,如:
<message-resources parameter="MessageResources" />
* 提供国际化资源文件
* 引入validator插件在struts-config.xml文件中,如:
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>
* 提供validation.xml和validator_rules.xml文件,将此文件拷贝到WEB-INF下
2、validator服务器端验证
* 配置validation.xml文件
3、validator客户端验证(javascr ipt)
) * 配置validation.xml文件
* 在jsp页面中包含< html:javascr ipt>
* 对需要验证的表单定义onsubmit事件,其中事件名称为validate+ActionForm的名称,如:validateLoginForm -struts validator to verify the fr a mework 1, configuration:* join the international allocation in the struts-config.xml file, such as: <message-resources parameter= MessageResources />* International* The introduction of resource file validator plug-in struts-config . xml file, such as: <plug-in className= org.apache.struts.validator.ValidatorPlugIn > <set-property property = pathnames value = /WEB-INF/validator-rules.xml,/WEB-INF/validation.xml /> </ plug-in>* provide validation.xml and validator_rules.xml document, copy this file to the WEB-INF under 2, validator server-side validation* validation.xml configuration file 3, validator client-side validation (javascr ipt))* configuration file* validation.xml in jsp page contains <html: javascr ipt>* on the need to verify the definition of the form onSubmit incident, in which case the name of validate+ ActionForm name, such as: validateLoginForm
(系统自动生成,下载前可以参看下载内容)
下载文件列表
struts_dynavalidator_login
..........................\.classpath
..........................\.mymetadata
..........................\.project
..........................\readme.txt
..........................\src
..........................\...\com
..........................\...\...\bjsxt
..........................\...\...\.....\struts
..........................\...\...\.....\......\LoginAction.java
..........................\...\MessageResources.properties
..........................\...\MessageResources_zh_CN.properties
..........................\...\o.properties
..........................\WebRoot
..........................\.......\index.jsp
..........................\.......\login1.jsp
..........................\.......\login2.jsp
..........................\.......\login_success.jsp
..........................\.......\META-INF
..........................\.......\........\MANIFEST.MF
..........................\.......\WEB-INF
..........................\.......\.......\classes
..........................\.......\.......\.......\com
..........................\.......\.......\.......\...\bjsxt
..........................\.......\.......\.......\...\.....\struts
..........................\.......\.......\.......\...\.....\......\LoginAction.class
..........................\.......\.......\.......\MessageResources.properties
..........................\.......\.......\.......\MessageResources_zh_CN.properties
..........................\.......\.......\.......\o.properties
..........................\.......\.......\lib
..........................\.......\.......\...\antlr.jar
..........................\.......\.......\...\commons-beanutils.jar
..........................\.......\.......\...\commons-digester.jar
..........................\.......\.......\...\commons-fileupload.jar
..........................\.......\.......\...\commons-logging.jar
..........................\.......\.......\...\commons-validator.jar
..........................\.......\.......\...\jakarta-oro.jar
..........................\.......\.......\...\struts.jar
..........................\.......\.......\struts-config.xml
..........................\.......\.......\validation.xml
..........................\.......\.......\validator-rules.xml
..........................\.......\.......\web.xml
..........................\.classpath
..........................\.mymetadata
..........................\.project
..........................\readme.txt
..........................\src
..........................\...\com
..........................\...\...\bjsxt
..........................\...\...\.....\struts
..........................\...\...\.....\......\LoginAction.java
..........................\...\MessageResources.properties
..........................\...\MessageResources_zh_CN.properties
..........................\...\o.properties
..........................\WebRoot
..........................\.......\index.jsp
..........................\.......\login1.jsp
..........................\.......\login2.jsp
..........................\.......\login_success.jsp
..........................\.......\META-INF
..........................\.......\........\MANIFEST.MF
..........................\.......\WEB-INF
..........................\.......\.......\classes
..........................\.......\.......\.......\com
..........................\.......\.......\.......\...\bjsxt
..........................\.......\.......\.......\...\.....\struts
..........................\.......\.......\.......\...\.....\......\LoginAction.class
..........................\.......\.......\.......\MessageResources.properties
..........................\.......\.......\.......\MessageResources_zh_CN.properties
..........................\.......\.......\.......\o.properties
..........................\.......\.......\lib
..........................\.......\.......\...\antlr.jar
..........................\.......\.......\...\commons-beanutils.jar
..........................\.......\.......\...\commons-digester.jar
..........................\.......\.......\...\commons-fileupload.jar
..........................\.......\.......\...\commons-logging.jar
..........................\.......\.......\...\commons-validator.jar
..........................\.......\.......\...\jakarta-oro.jar
..........................\.......\.......\...\struts.jar
..........................\.......\.......\struts-config.xml
..........................\.......\.......\validation.xml
..........................\.......\.......\validator-rules.xml
..........................\.......\.......\web.xml