You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matthew Watson <mw...@syscap.com> on 2003/05/28 17:57:56 UTC

Validation file never seems to be parsed...

Hi, 

I'm trying to use the struts validation framework. I've installed the
example struts-validator WAR into tomcat and the examples seem to work fine.


On startup various debug messages get spat out during the parsing of the
validator-rules.xml and validation.xml files.

Like so...

INFO: Add Global Constant: phone,^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$
May 28, 2003 4:25:49 PM org.apache.commons.validator.ValidatorResources
addConstantParam
INFO: Add Global Constant: zip,^\d{5}\d*$

...etc etc

Ok. Now when I try and set up some basic validation under my own context I
don't get any debug information and no validation seems to happen at all.

I've followed through all of the instructions and have extended
ValidationForm as per the instructions. I'm using the 1.1 RC1 release of
struts and have also downloaded the latest version of the
commons-validator.jar. 

This is the output I get...

May 28, 2003 4:25:46 PM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from
'/WEB-INF/config/validator-rules.xml'
May 28, 2003 4:25:46 PM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/config/validation.xml'
May 28, 2003 4:25:48 PM org.apache.struts.util.PropertyMessageResources
<init>

The debug level and detail levels are set to 3 as per the struts validation
example struts-config.xml...

Any help on this would be most appreciated as I've virtually finished the
application I'm working on apart from the validation...

thanks in advance,
Matt.

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


Re: Validation file never seems to be parsed...

Posted by Vic Cekvenich <vc...@baseBeans.com>.
I think you want to set log level using log4j properties.
Ex:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/bP/WEB-INF/src/war/log4j.properties

Matthew Watson wrote:

>Hi, 
>
>I'm trying to use the struts validation framework. I've installed the
>example struts-validator WAR into tomcat and the examples seem to work fine.
>
>
>On startup various debug messages get spat out during the parsing of the
>validator-rules.xml and validation.xml files.
>
>Like so...
>
>INFO: Add Global Constant: phone,^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$
>May 28, 2003 4:25:49 PM org.apache.commons.validator.ValidatorResources
>addConstantParam
>INFO: Add Global Constant: zip,^\d{5}\d*$
>
>....etc etc
>
>Ok. Now when I try and set up some basic validation under my own context I
>don't get any debug information and no validation seems to happen at all.
>
>I've followed through all of the instructions and have extended
>ValidationForm as per the instructions. I'm using the 1.1 RC1 release of
>struts and have also downloaded the latest version of the
>commons-validator.jar. 
>
>This is the output I get...
>
>May 28, 2003 4:25:46 PM org.apache.struts.validator.ValidatorPlugIn
>initResources
>INFO: Loading validation rules file from
>'/WEB-INF/config/validator-rules.xml'
>May 28, 2003 4:25:46 PM org.apache.struts.validator.ValidatorPlugIn
>initResources
>INFO: Loading validation rules file from '/WEB-INF/config/validation.xml'
>May 28, 2003 4:25:48 PM org.apache.struts.util.PropertyMessageResources
><init>
>
>The debug level and detail levels are set to 3 as per the struts validation
>example struts-config.xml...
>
>Any help on this would be most appreciated as I've virtually finished the
>application I'm working on apart from the validation...
>
>thanks in advance,
>Matt.
>  
>

-- 
Vic Cekvenich,
Struts Instructor,
1-800-917-JAVA

Advanced <a href ="baseBeans.com">Struts Training</a> and project recovery in North East. 
Open Source <a href ="baseBeans.com">Content Management</a>  basicPortal sofware
Best practice<a href ="baseBeans.com">Struts Support</a> v.1.1 helper ScafflodingXPress




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