When your struts application starts up it parses the validation xml
files you specify for Struts's validator plugin and creates the
configuration objects needed by Commons Validator and stores them in
application scope. These are the "resources" its referring to.

When your ActionForm's validate method is called it tries to retrieve
those "resources" from application scope to get the configured
validation rules to use for the form.

If it can't find the "resources" then it looks like something has gone
wrong at startup - first place to check the configuration you have in
struts for validator - and the logs to see if there are any
errors/warnings at startup time.

You'll probably get more help asking Struts related questions for
validator on the Struts user list.

http://struts.apache.org/1.2.x/userGuide/dev_validator.html


Niall


On 8/17/06, Joe Yuen <[EMAIL PROTECTED]> wrote:

I am trying to setup my struts web application to use the commons validator. 
However, I must not have set it up properly. After going through the setup I am 
getting the following error:

java.lang.IllegalArgumentException: Resources cannot be null.
        org.apache.commons.validator.Validator.<init>(Validator.java:188)
        org.apache.struts.validator.Resources.initValidator(Resources.java:475)
        
org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:104)
        
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:950)
        
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
        org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Can anyone enlighten me on what resources this error is referring to?



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

Reply via email to