I am happy to announce that I moved a little closer at integrating Struts 1 and 2 seamlessly. As always, my goal is to mesh them within one context without losing any S1 functionality.
One issue of Struts 1.x is that dispatching is supported exclusively within the Action. Many designers note it as a flaw -- that an Action would execute the dispatching logic itself -- and I see some truth to this. A better solution is to make the Controller handle this responsibility outright. Thus, a new "dispatcher" attribute has been added to the action mapping. The Controller can now delegate to the configured Dispatcher which will in turn invoke the Action. What's neat about the Dispatcher interface is that it takes an ActionContext and returns an Object. The input can be for a servlet (ServletActionContext), a portlet, or any other kind of medium. The output can also be anything. So the classic execute() signature doesn't have to be so anymore.... as long as the Controller can interpret the response. Four kinds of responses are handled out of the box: * ActionForward (as before) to forward * null (as before) to handle the response directly * String, to represent a forward name * void, to represent calling the SUCCESS result I see two potentials. (1) Possibly any kind of dynamic method signature and (2) S1 mapping can delegate to S2 actions and vice-versa. There's some more javadoc to do, but please take a look in SVN in the meantime. Paul --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]