What is the difference between Struts 1.x and Struts 2.x?

STRUTS1.X
STRUTS2.X
ActionServlet is the front controller in struts1
In struts 2 FilterDispatcher act as the front controller
We have Action classes and form beans separately in struts1
We have Action classes and Form beans combined as Action class only in struts2, we can maintain separately if occur
In struts1, configuration file name can be 'anyName.xml' and used to place in WEB-INF folder
configuration file name must be 'struts.xml' and used to place in CLASSES folder in struts2
Properties file must be configured in struts-config.xml in struts1
Need to configure our resource bundles in struts.properties file in struts2
We have Request processor class in struts1
In struts2, we have Interceptors in place of Request processor
In struts1, programmatic and declarative validations only we have
We have annotation support also along with programmatic and declarative validations
Struts1 have multiple tag libraries like HTML, LOGIC, BEAN etc.
Struts2 have single tag library which includes all tags in place of multiple tag libraries

No comments:

Post a Comment