jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deryl Seale <de...@acm.org>
Subject Re: struts testcase... NullPointerException...
Date Tue, 19 Mar 2002 20:36:20 GMT
You should not have to change the code to test it,
it's true.  And this should be fixed in the 1.6
version of StrutsTestCase -- specifically, addressing
the perfectly valid case when validate() returns
a null value.

If it is not fixed, or if you guys are using v1.5,
let me know, and I'll post a patch.  I'm sorry to
be so absent, but my job is kicking my ass right


On Tue, 19 Mar 2002 11:45:00 -0800 (PST), BALA KRISHNA wrote:
>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:
>>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.
>Do You Yahoo!?
>Yahoo! Sports - live college hoops coverage
>To unsubscribe, e-mail:   <mailto:cactus-user-
>For additional commands, e-mail: <mailto:cactus-user-

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