随笔分类 - struts1
摘要:在工程中集成validate框架,你需要查看org.apache.struts.validator包下的validator-rules.xml文件,它是validate框架的校验规则文件,这个文件说明了如何在struts工程中集成validate框架:1、在struts-config.xml文件中配置validate插件。2、创建资源文件,并复制validate框架工作需要的信息。3、把struts-cookbook-1.3.8例程自带的、validate框架的配置文件validation.xml,复制到当前web工程的WEB-INF目录下。validate框架环境搭建好后,就可以采用配置的方
阅读全文
摘要:struts转发请求在struts的配置文件struts-config.xml文件中,可以配置forward标签,它用于封装一个转发地址。如:<forward name=“success" path="/success.jsp"/>struts配置文件的常用配置<actionpath=“/register“ 指定action处理的地址type=“cn.itcast.RegisterAction" 请求action的完整类名name=“UserFormBean“ 指定封装请求参数的formBeanscope="request&q
阅读全文
摘要:用户注册案例:1.写一个register.jsp页面<form action="${pageContext.request.contextPath }/register.do" method="post"> 用户名:<input type="text" name="username"><br/> 密码:<input type="password" name="password"><br/> 确认密码:<inpu
阅读全文
浙公网安备 33010602011771号