commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <>
Subject Re: using Validator in a non-Struts application
Date Thu, 30 Oct 2003 00:37:59 GMT

--- Michael Shaw <> wrote:
> Hi there, my apologies if this is the wrong forum for my questions, but
> I'm having trouble locating information about using Validator outside of
> Struts.
> My problem may stem directly from my misunderstanding of Validators'
> capabilities, but as I understand it Validator can generate
> error-messages from a pattern supplied by looking up the value of the
> "msg" attribute in a Validator element (in the validator-rules.xml) in
> the ValidatorResources instance.  My question is: does Validator perform
> this action itself (i.e. look up the error pattern and substitute the
> argument values into the pattern and return the resulting string) - if
> so, how do you invoke this?  Or is this all left as an exercise for the
> user?

Validator does not resolve message resource keys itself.  It only provides
the information to the surrounding application.  This allows a framework
like Struts to manage resources from multiple modules and multiple files. 
There is an example of using Validator in a standalone app. in the CVS
/src/example directory.


> I've looked through
> fStruts but it doesn't quite answer my question.  Any thoughts or links
> to relevant examples would be much appreciated.
> Thanks in advance,
> MikeS
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message