I am trying to convert a Struts 1.2 app to Struts 1.3.

Method definitions for custom validation in validator-rules.xml

Struts 1.2 Version

<validator name="required"
classname="org.apache.struts.validator.FieldChecks"
method="validateRequired"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
msg="errors.required"/>

Struts 1.3 Version

<validator name="required"
classname="org.apache.struts.validator.FieldChecks"
method="validateRequired"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
>>>>>>>>>org.apache.commons.validator.Validator,<<<<<<<<<
javax.servlet.http.HttpServletRequest"
msg="errors.required"/> 

 

In Struts 1.2 version I did not have to pass the Validator object for
the required field. But with 1.3 am being forced to do so, if not I get
a No Such Method Exception. Now that I have tweaked the "required"
validator, when I try to run my struts application, am getting a
org.apache.commons.validator.ValidatorException: No such validation
method: null exception. Digging into the error stack trace it says
java.lang.NullPointerException: No message resources found for bundle:
org.apache.struts.action.MESSAGE

I have the validator.xml, validator-rules.xml and errors.properties
intact from my Struts 1.2 version.

Any thoughts or ideas of what am doing wrong.

Harsh.

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

Reply via email to