Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

What's changed in Struts 2 ?

  Asked By: Everett    Date: Nov 29    Category: Java    Views: 907
  

Struts 2 is designed to be simpler to use and closer to how Struts
was always meant to be. To Struts 1 developers, Struts 2 feels strange
but familiar. Some key changes from Struts 1 are:

* Smarter!
o Improved design - All Struts 2 classes are based on interfaces.
Core interfaces are HTTP independant.
o Intelligent Defaults - Most configuration elements have a
default value that you can set and forget.
o Enhanced Results - Unlike ActionForwards, Struts 2 Results can
actually help prepare the response.
o First-class AJAX support - The AJAX theme gives your
interactive applications a boost.
o Stateful Checkboxes - Struts 2 checkboxes do not require
special handling for false values.
o QuickStart - Many changes can be made on the fly without
restarting a web container.

* Easier!
o Easy-to-test Actions - Struts 2 Actions are HTTP independant
and can be tested without resorting to mocks.
o Easy-to-customize controller - Struts 1 lets you customize the
request processor per module, Struts 2 lets you customize the request
handling per action, if you like.
o Easy-to-customize tags - Struts 2 tags can be customized by
changing an underlying stylesheet. Individual tags can be customized
by editing a FreeMarker template. No need to grok the taglib API! Both
JSP and FreeMarker tags are fully supported.
o Easy cancel handling - The Struts 2 Cancel button can go
directly to a different action.
o Easy Spring integration - Struts 2 Actions are Spring-aware.
Just add your own Spring beans!
o Easy Plugins - Struts 2 extensions can be added by dropping in
a JAR. No manual configuration required!

* POJO-ier!
o POJO forms - No more ActionForms! Use any JavaBean you like or
put properties directly on your Action. No need to use all String
properties!
o POJO Actions - Any class can be used as an Action class. You
don't even have to implement an interface!

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on What's changed in Struts 2 ? Or get search suggestion and latest updates.




Tagged: