Difference Between LookupDispatch Action & DispatchAction?
Ashok A Kumar
Greenhorn
Joined: Jul 01, 2010
Posts: 19
posted
0
Hi,
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:
Hi David,
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.
You're also talking about Struts 1, which is *quite* old both in time and in approach; frameworks like Struts 2, Spring MVC, Stripes, etc. also eliminate Struts 1 issues.
patil biradar
Greenhorn
Joined: Oct 22, 2012
Posts: 1
posted
0
i am getting error please enebody please help me
this is example om lookupdispatch action