I've been looking at the current proposal for Strut's 2.0 config.  I think
it's a little too complex and the "extends" concept could be simplified
while gaining the same advantages as breaking your app into modules.

The struts config has many of a single element type of "mapping".  Mappings
would have a single attribute of URI and would run under the same rules as
the Servlet Filter Mapping.

<mapping uri="/*">
        <action execute="#{applicationController.validateLogin}" />
        <catch exception="com.mckesson.smo.AuthorizationException" />
        <form id="C" />
</mapping>

<mapping uri="/ordering/*">
        <bean id="orderController" class="com.mckesson.smo.OrderController"
scope="session">
                <property name="application">
                        <value>#{applicationController}</value>
                </property>
        </bean>
        <action execute="#{orderController.validateUser}" />
        <catch exception="com.mckesson.smo.AuthorizationException" />
</mapping>

<mapping uri="/ordering/startOrder.jspx">
        <action execute="#{orderController.startOrder}" />
</mapping>


Mappings would be fired like filters and actions would/could be chained.
Child elements of the mapping element could be overridden then based on the
requested URI.

In the example above, the "/ordering/*" mapping would override the catch
from the "/*" mapping.  Also, actions would be executed in the order least
specific to most specific URI mapping.

ActionForwards could also be overridden also in this same manor to allow
generic mappings to look for a "badAuthorization" forward, but it can be
overridden in a more specific mapping.

The bean element would allow you to scope beans within
request|session|application, but also take care of cleaning up the beans
when they leave one of those mappings.  This could help with wizard type
flows where if the bean was of XXListenerType, it could receive create and
destroy events and enforce users to stick within a flow.

Just some ideas... I've been working on developing a mock version of this
between projects at work.

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to