At 06:52 AM 8/11/2004, you wrote:

> Hi Folks,
>
> I am using a DispatchAction which switches between several methods depending on the value of the forwarding parameter which is set in the JSP(see code snipet below).
>
> The DispatchAction is fine approx 80% of the time, but ocassionally and without warning, I get the following DispatchAction error --
> ERROR [apache.struts.actions.DispatchAction] Request[/admin/UserDetails] does not contain handler parameter named action.


 "action", Your request parameter, which drives which method to
dispatch to, is null for that particular request.

Thanks,
Kishore Senji.

The reason the request parameter is null is probably because your hidden parameter is misspelled or something. I am not sure why people like this DispatchAction. It overcomplicates simple solutions and leads to this sort of problem. In my opinion, using the DispatchAction just complicates and couples matters that don't need the complication and certainly don't need the decoupling. If you had merely used, for example, <input type='hidden' name='method' value='hidden'> and not set your parameter in your action mapping to 'method', you would achieve the same result. The only thing that DispatchAction and LookupDispatchAction do is to tie the parameter attribute value in the ActionMapping to a given parameter name in the request. This is not a good thing, in my opinion, but a bad thing.


Michael




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



Reply via email to