wood burning stoves 2.0*
The moose likes Struts and the fly likes Problem with LookupDispatchAction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with LookupDispatchAction" Watch "Problem with LookupDispatchAction" New topic
Author

Problem with LookupDispatchAction

sudhakar Tadepalli
Ranch Hand

Joined: Dec 27, 2001
Posts: 130
Here is the flow

1.I have a ListAction extends BaseAction.
2.ListAction has a method
public ActionForward docList(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

System.out.println("Heloo I am here *********************");
return mapping.findForward("listPage");
}
2.BaseAction extends LookupDispatchAction
Base action overrrides execute method for doing some authentiucation.
When the request comes, the execute method being called in BaseAction and After completing ececute method in BaseAction the control is not coming to child class(ListAction) and not executing docList method.

Can some one explain me how to do this?
basha khan
Ranch Hand

Joined: Jan 26, 2002
Posts: 516
Did u override getKeyMethodMap method in ur last child class ?.
sudhakar Tadepalli
Ranch Hand

Joined: Dec 27, 2001
Posts: 130
I din't get clearly could you explain more specific ?

Thanks
sudhakar Tadepalli
Ranch Hand

Joined: Dec 27, 2001
Posts: 130
I already have getKeyMethodMap defined in the child action class.
sudhakar Tadepalli
Ranch Hand

Joined: Dec 27, 2001
Posts: 130
Can some one answer this ?
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
how are you calling docList method from jsp? I believe you are not calling this method correctly. post your code.
[ December 15, 2005: Message edited by: Vicky Pandya ]
sudhakar Tadepalli
Ranch Hand

Joined: Dec 27, 2001
Posts: 130
It is a working application without any problem when my childAction extends LookupDispatchAction. Here is the sample code from JSP,ofcurse it is calling edit method in my Action class.

I tried to copy the code from JSP and website now allowing me because of html coding.

Now I changed as follows.

ChildAction extends BaseAction
BaseAction extends LookupDispatchAction

BaseAction overrides execute method for doing some authentication then it shoud call appropriate childAction method to excute. Which is not happening.

Thnaks
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
in the execute() method of BaseAction, are you calling the execute method in the superclass with "forward = super.execute(...)"? If not, this may be the problem.


Merrill
Consultant, Sima Solutions
 
Consider Paul's rocket mass heater.
 
subject: Problem with LookupDispatchAction