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


Please Help Members By Posting Answers For Below Questions

How is declarative handling of exceptions done in struts ?

1014


What are the contents on web.xml in struts application ?

1081


What is action chaining ?

1180


What do you know about validation plugin ?

1041


What is the difference between filters and interceptors ?

1323