This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with LookupDispatchAction" Watch "Problem with LookupDispatchAction" New topic

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 ?

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.

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.

Consultant, Sima Solutions
wood burning stoves
subject: Problem with LookupDispatchAction
Similar Threads
How to Check Session in Controller
Session expiration in struts using nested tags
problem with LookupDispatchAction
How to separate it out prepare and process
Collaboration between Struts Actions and plain old Servlets