Difference Between LookupDispatch Action & DispatchAction?
Ashok A Kumar
Joined: Jul 01, 2010
What is the actual difference between LookupDispatchAction and DispatchAction? I've tried reading some points over the web and its not clear.. "LookupDispatchAction Shields the application from the side effect of I18N" , Also it refers about ResourceBundle and Locale Independent.. Do i need to understand ResourceBundle and Locale before diving into Struts???.. Also i don't have much idea about I18N..
No, you don't need to understand I18N to get started with Struts (although some knowledge of resource bundles would be useful).
However, it looks like you're asking about Struts 1, which I'd try to avoid unless you have an actual reason for using it. Aim for Struts 2 if you're interested in Struts.
The basic difference is that LookupDispatchAction uses a map and the message key to look up (hence the Lookup part of the class name) which method to run, while DispatchAction uses the parameter value directly. See their corresponding Javadocs to read more:
Thanks for the links and i've understood the difference between these two, However I've started learning struts long back and i've felt the learning curve is kind of steep, Parallely i've started updating myself in JSF and understood it has very distinct and significant advantage over Struts.. These are all the points that i've come across
• Eliminated the need for a Form Bean
• Eliminated the need for a DTO Class
• Allows the use of the same POJO on all Tiers because of the Backing Bean
Kindly advise me on the above, Your valuable suggestion will defantely help in moving forward and it will shape my learing path.