What is the difference between struts1 and struts2?



What is the difference between struts1 and struts2?..

Answer / Sarika Chaudhari

The main differences between Struts 1 and Struts 2 are: Architecture (Struts 1 follows the classic MVC pattern, while Struts 2 uses a plugin-based architecture), Dependency Injection (Struts 2 uses dependency injection, whereas Struts 1 uses service locator), Configuration files (Struts 1 uses struts-config.xml, while Struts 2 uses annotations or XML configuration), and Default Action Mapping (In Struts 1, the default action mapping is performed by ActionServlet, whereas in Struts 2, it's handled by DispatchAction).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Struts Interview Questions

Explain the difference between dispatchaction and lookupdispatchaction in struts?

1 Answers  


What is the purpose of redirect result type?

1 Answers  


What is the use of lookupdispatchaction?

1 Answers  


In struts, how can we access java beans and their properties?

1 Answers  


How is the mvc design pattern used in struts framework?

1 Answers  


What is use of i18n interceptor?

1 Answers  


what is use of assert keyword in java..?

1 Answers  


What is difference between actionform and dynaactionform?

1 Answers  


in struts how to use hibernate with struts>

1 Answers   Infosys,


What is jakarta struts framework?

1 Answers  


What is struts and why it is used?

1 Answers  


Explain about the library tag?

1 Answers  


Categories