Ok, I found them in the source of that day, now everything works.
Thanks a lot for your help!

Eric

-----Original Message-----
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 23. M�rz 2004 18:24
To: Jakarta Commons Users List
Subject: RE: [Validator] Using Struts validators outside of Struts


TestValidator may be in the testing code that is not distributed in the
jar.  I've only run the standalone example from my IDE with the full
validator project checked out from cvs.  It does work, trust me :-).

David

--- [EMAIL PROTECTED] wrote:
> Ok, thanks! However now I get
> org.apache.commons.validator.ValidatorException:
> org.apache.commons.validator.TestValidator
>       at
>
org.apache.commons.validator.ValidatorAction.loadValidationClass(ValidatorAc
> tion.java:649)
>       at
>
org.apache.commons.validator.ValidatorAction.executeValidationMethod(Validat
> orAction.java:558)
>       at
> org.apache.commons.validator.Field.validateForRule(Field.java:808)
>       at org.apache.commons.validator.Field.validate(Field.java:887)
>       at org.apache.commons.validator.Form.validate(Form.java:171)
>       at
> org.apache.commons.validator.Validator.validate(Validator.java:367)
>       at
> ch.sri.test.validator.ValidateExample.main(ValidateExample.java:106)
> 
> Looking at what's in the JAR, it seems that TestValidator is missing. Am
> I
> using an old example?
> 
> Eric
> 
> -----Original Message-----
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Dienstag, 23. M�rz 2004 16:04
> To: Jakarta Commons Users List
> Subject: RE: [Validator] Using Struts validators outside of Struts
> 
> 
> 1.0.2 is the latest released version.  You can get a nightly build here:
> http://cvs.apache.org/builds/jakarta-commons/nightly/commons-validator/
> 
> David
> 
> --- [EMAIL PROTECTED] wrote:
> > Hm... I just downloaded the examples from
> >
>
http://cvs.apache.org/viewcvs.cgi/jakarta-commons/validator/src/example/org/
> > apache/commons/validator/example/
> > 
> > But I get compilation errors, since "The constructor
> > ValidatorResources(InputStream) is undefined". According to the
> > Manifest.mf
> > file in the JAR, I'm using 1.0.2. Isn't this the latest version?
> > 
> > Eric
> > 
> > 
> > -----Original Message-----
> > From: David Graham [mailto:[EMAIL PROTECTED]
> > Sent: Dienstag, 23. M�rz 2004 15:21
> > To: Jakarta Commons Users List
> > Subject: RE: [Validator] Using Struts validators outside of Struts
> > 
> > 
> > 
> > --- [EMAIL PROTECTED] wrote:
> > > No, I'm using them outside of a webapp.
> > 
> > Then you should definitely be writing your own validation methods and
> > not
> > using Struts as they're tied to the Servlet environment.
> > 
> > > Right now, I'm wading through the Struts FieldChecks and trying to
> > > simplify
> > > them.
> > > Perhaps it would be easier to create my own FieldChecks... however,
> I
> > > don't
> > > know how I can access the value of "msg" in a validator tag within
> > > validator-rules.xml.
> > > Do you know any example that uses it? If possible with configurable
> > > messages
> > > with {0}, {1} etc.
> > 
> > I don't know of any examples of that use case but there is a
> standalone
> > (ie. non-webapp) example in cvs.  Validator doesn't handle messages
> > itself; it simply returns the lookup key and replacement args for you
> to
> > resolve in your messages.properties file (or however you're doing
> > messaging).
> > 
> > David
> > 
> > > 
> > > Eric
> > > 
> > > -----Original Message-----
> > > From: David Graham [mailto:[EMAIL PROTECTED]
> > > Sent: Dienstag, 23. M�rz 2004 14:42
> > > To: Jakarta Commons Users List
> > > Subject: Re: [Validator] Using Struts validators outside of Struts
> > > 
> > > 
> > > Are you trying to use these in a webapp?  Many Struts validations
> are
> > > simple wrappers around Commons Validator classes/methods.  It may be
> > > easier and lighter weight to just implement your own pluggable
> > > validation
> > > methods similar to Struts.
> > > 
> > > David
> > > 
> > > --- [EMAIL PROTECTED] wrote:
> > > > Hi
> > > > 
> > > > I'm trying to use the Struts validator classes outside of Struts.
> I
> > > > asked
> > > > this question earlier, but by now I've read and applied the
> chapter
> > > > "Using
> > > > the Validator Outside of Struts" in "Programming Jakarta Struts"
> and
> > > > tried
> > > > the code there.
> > > > 
> > > > Has anybody else tried this and succeeded?
> > > > I get a NullPointerException at
> > > >
> > >
> >
>
org.apache.struts.validator.Resources.getMessageResources(Resources.java:150
> > > > ), so I suspect the Struts validator can't find my
> > > > ApplicationResources.properties. I don't know too much about the
> > place
> > > > of
> > > > the ApplicationResources; I placed them into the root of my
> classes
> > > > tree,
> > > > but that didn't work.
> > > > 
> > > > Any help is greatly appreciated.
> > > > 
> > > > Best regards,
> > > > Eric
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > > 
> > > 
> > > 
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Finance Tax Center - File online. File on time.
> > > http://taxes.yahoo.com/filing.html
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Finance Tax Center - File online. File on time.
> > http://taxes.yahoo.com/filing.html
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to