jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BALA KRISHNA <ebalki2...@yahoo.com>
Subject Re: struts testcase... NullPointerException...
Date Tue, 19 Mar 2002 19:45:00 GMT

Hi Alan,

Thanks for the solution. My problem too got solved
when I override the validate function in the action
form. But I have a question:

1. Why should one change the actual code for the sole
reason of being able to test it? The application works
fine even if "validate" method is not there.


--- Alan Halley <alan_halley2001@yahoo.com> wrote:
>  Hi,
> In my case the problem was caused by the default
> validation routine in ActionForm. If this method is
> not overidden in your code then the default method
> returns a null and this seems to be th root of the
> null pointer problem.
> I overrode this method as follows:-
> public ActionErrors validate(ActionMapping
> mapping,HttpServletRequest request)
> {
>  return new ActionErrors();
> }
> This appeared to cure the problem.
> Alan

Do You Yahoo!?
Yahoo! Sports - live college hoops coverage

To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>

View raw message