Don Brown on Unification of Struts Action and JSF

May 23rd, 2006 by Samuel Santos Leave a reply »

In Unification: Struts Action and JSF, Don Brown show us how to use Struts Action 2 and JSF as one framework.

Struts Action 2, based on the WebWork 2.2 code, has builtin support for JSF, using an approach that smoothly combines both frameworks into one configuration file, one framework. Struts Action takes the familiar Action-based approach to page logic and navigation, and sprinkles in optional support for JSF components. The result is a framework that lets the developer easily incorporate component-driven pages as application needs dictate.

The JSF components still have access to the entire JSF lifecycle while retaining the action-based paradigm.

JSF/Struts Action configuration file example:

<action name="employee" class="org.apache.struts.action2.showcase.jsf.EmployeeAction">
    <interceptor-ref name="basicStack" />
    <interceptor-ref name="jsfStack" />
    <result name="success" type="jsf" />
    <result name="index" type="redirect-action">index</result>
</action>
Don't be shellfish...Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInPin on PinterestBuffer this pageEmail this to someone
Advertisement

Leave a Reply