jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Halley <alan_halley2...@yahoo.com>
Subject Re: struts testcase... NullPointerException...
Date Wed, 20 Mar 2002 15:09:33 GMT

 Hi Deryl,
It's not causing me any great issue at the moment (on 1.5) so no panic for the patch.
Alan
 
  Deryl Seale <deryl@acm.org> wrote: 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
now.

-d.

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.
>
>Thanks,
>balki
>
>
>--- Alan Halley 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
>http://sports.yahoo.com/
>
>--
>To unsubscribe, e-mail: >unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: >help@jakarta.apache.org>
>




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



---------------------------------
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message