日期:2014-05-18  浏览次数:20840 次

struts验证
当我验证没通过时       为什么页面上的东西全部都不在了
就只是个空页面呢     请教  
代码如下
在struts-config里面配置的一个动态form
  <form-bean   name= "editcusForm "   type= "org.apache.struts.validator.DynaValidatorForm ">
            <form-property   name= "cstmId "   type= "java.lang.String "/>
            <form-property   name= "cstmName "   type= "java.lang.String "   />        
            <form-property   name= "password "   type= "java.lang.String "   />
            <form-property   name= "pwdQus "   type= "java.lang.String "   />
            <form-property   name= "answer "   type= "java.lang.String "   />
            <form-property   name= "metier "   type= "java.lang.String "   />
            <form-property   name= "realName "   type= "java.lang.String "   />
            <form-property   name= "sex "   type= "java.lang.String "   />
            <form-property   name= "birthday "   type= "java.lang.String "   />
            <form-property   name= "phone "   type= "java.lang.String "   />
            <form-property   name= "email "   type= "java.lang.String "   />
            <form-property   name= "homeAddress "   type= "java.lang.String "   />
            <form-property   name= "nowAddress "   type= "java.lang.String "   />

        </form-bean>
这个是action的隐射
  <action
            attribute= "CustomersForm "
            name= "CustomersForm "
            path= "/editCustomer "
            parameter= "action "
            scope= "request "
            type= "cn.com.action.EditcstmAction ">
            <forward   name= "success "   path= "/editcustomer.jsp "   />
            <forward   name= "underfind "   path= "/index.jsp "   />
页面提交是onsubmit= "return   editcusForm(this) "
这个是在validate.xml里面配置的验证
<form   name= "editcusForm ">
<!--   真实姓名验证   格式:必须填写,长度不能小于6   -->
<field   property= "realName "   depends= "required,minlength ">
<msg   name= "required "   key= "errors.required "/>
<msg   name= "minlength "   key= "errors.minlength "/>
&