Struts 1 vs Struts 2 (III)

16 January 2008

This post is in continuation to Struts 1 vs Struts 2 (I) & (II). Go through Struts 1 vs Struts 2 (I) & (II) first.

8. Binding values into views

In the view section, Struts1 uses the standard JSP mechanism to bind objects into the page context to access. However, Struts 2 uses a “ValueStack” technology so that the taglibs can access values without coupling your view to the object type it is rendering. The ValueStack strategy allows the reuse of views across a range of types which may have the same property name but different property types.

9. Type Conversion

Usually, Struts1 ActionForm properties are all Strings. Struts1 uses Commons-Beanutils for type conversion. These type converters are per-class and not configurable per instance. However, Struts 2 uses OGNL for type conversion. The framework includes converters for basic and common object types and primitives.

10. Control Of Action Execution

Struts1 supports separate Request Processor for each module, but all the Actions in a module must share the same lifecycle. However, Struts 2 supports creating different lifecycles on a per Action basis via Interceptor Stacks. Custom stacks can be created and used with different Actions as needed.

del.icio.us:Struts 1 vs Struts 2 (III)  digg:Struts 1 vs Struts 2 (III)  spurl:Struts 1 vs Struts 2 (III)  wists:Struts 1 vs Struts 2 (III)  simpy:Struts 1 vs Struts 2 (III)  newsvine:Struts 1 vs Struts 2 (III)  blinklist:Struts 1 vs Struts 2 (III)  furl:Struts 1 vs Struts 2 (III)  reddit:Struts 1 vs Struts 2 (III)  fark:Struts 1 vs Struts 2 (III)  blogmarks:Struts 1 vs Struts 2 (III)  Y!:Struts 1 vs Struts 2 (III)  smarking:Struts 1 vs Struts 2 (III)  magnolia:Struts 1 vs Struts 2 (III)  segnalo:Struts 1 vs Struts 2 (III)  gifttagging:Struts 1 vs Struts 2 (III)

Top Of Page | Trackback

If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.

It will look like this: Struts 1 vs Struts 2 (III)

Leave a Reply