Details
Description
Consider this struts.xml snippet:
<action name="customerContract"
class="customerContractAction">
<result name="success" type="dispatcher">
/jsp/s2/customerContract.jsp
</result>
</action>
<action name="customerContractFilter"
class="customerContractAction" method="filter">
<result name="success" type="dispatcher">
/jsp/s2/customerContract.jsp
</result>
</action>
The zero configuration at this time only has @Result and @Results tags. This means that:
- it is not possible to configure multiple actions that share the same action-class (or action-bean in Spring); 'customerContract' and 'customerContractFilter' both point to the same action class, only the 'method' parameter is different ==> Struts 2 should offer some annotations for this
- there's no way to express (with an annotation) that the Action-object should be injected with Spring beans (in a specific Spring ApplicationContext). It would be nice that such a feature would also be added to the framework
This way, we could (completely/partially) eliminate the struts.xml file, or, in other words, make Zero Configuration really practically useable (which, IMHO, is not the case now.
Regards
Christian