Diff between Struts1 and struts 2?
2 Answer(s)      7 years ago
Posted in : Struts

What are the difference in between Struts 1 and Struts 2?

View Answers

February 26, 2008 at 11:09 AM

Hi Gaurav

There is a big difference in struts1 and struts2 you can read it here at

But the best part is, struts 2 has more features and its easier then struts 1.


February 26, 2008 at 6:34 PM

Struts1 Vs Struts2

Struts2 is more powerful framework as compared to struts1. The table given below describes some differences between struts1 and struts2

Feature Struts 1 Struts 2
Action classes Struts1 extends the abstract base class by its action class. The problem with struts1 is that it uses the abstract classes rather than interfaces. While in Struts 2, an Action class implements an Action interface, along with other interfaces use optional and custom services. Struts 2 provides a base ActionSupport class that implements commonly used interfaces. Although an Action interface is not necessary, any POJO object along with an execute signature can be used as an Struts 2 Action object.
Threading Model Struts 1 Actions are singletons therefore they must be thread-safe because only one instance of a class handles all the requests for that Action. The singleton strategy restricts to Struts 1 Actions and requires extra care to make the action resources thread safe or synchronized while developing an application. Struts 2 doesn?t have thread-safety issues as Action objects are instantiated for each request. A servlet container generates many throw-away objects per request, and one more object does not impose a performance penalty or impact garbage collection.

To know more about the differences between Struts 1 and Struts2 click on the link