struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Wen Zhe <zwen...@espatial.com>
Subject RE: validator error for struts1.2.8
Date Wed, 26 Apr 2006 15:15:29 GMT
I notice that you use "CLoginVO" for formbean name, and use "cLoginForm" in
validation.xml

Should we use the same name for these two fields!!?? 

Regards,
Jason

-----Original Message-----
From: Raghuveer [mailto:raghuveerv@infotechsw.com] 
Sent: 26 April 2006 16:11
To: user@struts.apache.org
Subject: validator error for struts1.2.8

I am getting below error when started implementing validaor framework

Servlet error: Cannot load a validator resource from
'/WEB-INF/validator-rules.xml
I'm running Struts Version 1.2.8.
I am using ValidatorForm
public class CLoginVO extends ValidatorForm{

-------------
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
 <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

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules
Configuration 1.1.3//EN"
          "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">

<form-validation>
<formset>

        <!-- An example form -->
        <form name="cLoginForm">
            <field
                property="username"
                depends="required">
                    <arg key="cLoginForm.username"/>
            </field>
            <field
                property="password"
                depends="required,mask">
                    <arg key="cLoginForm.password"/>
                    <var>
                        <var-name>mask</var-name>
                        <var-value>^[0-9a-zA-Z]*$</var-value>
                    </var>
            </field>
        </form>
    </formset>
</form-validation>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message