adspace
What is the difference between struts1 and struts2?
Answer Posted / 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 View All Answers