> The problem is that the execute method ALWAYS gets executed and not the
intended method.
> Does anybody know why EXECUTE is called but the intended ADDBANANA method
is not called?

You've effectively "undone" the use of LookupDispatchAction by overriding
the execute method without calling super.execute(...).  You correctly
complain that *your* execute method is being called, not the one in
LookupDispatchAction that figures out which method to call.  So either get
rid of your execute method, or make sure to call super.execute(...).

In addition, as David mentioned, the things in the KeyMethodMap should be
keys present in your ApplicationResources.properties file, not the actual
value in the request.

An example from my project:

   ApplicationResources.properties contains:
      button.add.prospect=Add Prospect
      button.delete.prospect=Delete Prospect

   and getKeyMethodMap has this:
      map.put( "button.add.prospect", "addProspect" );
      map.put( "button.delete.prospect", "deleteProspect" );

Also consider implementing the 'unspecified' method to prevent a problem if
the specified parameter is not present in the request.

HTH,

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

Reply via email to