Meaningless Drivel is fun!
The moose likes Struts and the fly likes Difference between DispatchAction and LookupDispatchAction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Difference between DispatchAction and LookupDispatchAction" Watch "Difference between DispatchAction and LookupDispatchAction" New topic

Difference between DispatchAction and LookupDispatchAction

Sumit Sahu

Joined: Jan 10, 2008
Posts: 7
i was having some confusion on the difference between them,can any please explain the difference.
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1340

Main diff beten these Actiosn are

LookupDispatchAction is used when we are using Struts's Internalization functionlaity in Application means when your app supports multiple languges.

Using DispatchAction Class we will not be able to apply "internalization" functionality.

~ Abhay Agarwal

Oracle certified Java 8 Programmer I (1Z0-808), Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I, CIW Certified Ecommerce specialist
S Reddy
Ranch Hand

Joined: May 17, 2007
Posts: 45
DispatchAction and LookupDispatchAction both are used to combine related operations into a single class, so that they can share common resources like helper methods without exposing them to other classes.

DispatchAction selects the method to execute depending on the request parameter value which is configured in the xml file. This will be problematic for internationalized applications since the values will be different for different locales. So, LookupDispatchAction looks into the resource bundle file and find out the corresponding key name. We can map this key name to a method name by overriding the getKeyMethodMap() method.
Sumit Sahu

Joined: Jan 10, 2008
Posts: 7
thanks for the help..
I agree. Here's the link:
subject: Difference between DispatchAction and LookupDispatchAction
It's not a secret anymore!