How to learn from Javaeye today
If you don't like Struts's traditional processing mode, I hope that each request is handled with a separate Action object, so that you can: java code:
PUBLIC Abstract Class BaseAction Extends Action {Public ActionForward Execute (BaseAction Action = (BaseAction) this.getClass (). NewinStance (); Return Action.doExecute (...); }protace Abstract ActionForward Doexecute ();
Public class actiona extends baseAction {.....
Public actionforward doexecute (....) {............ Return mapping.findforward (.....);}}
This line does not interfere with each other.
Similarly, if you want to get REQUEST through ActionContext as WW2, don't have to get REQUEST through the method of passing, as long as you put an action in the Threadlocal in the baseAction, then write a secondary class similar to ActionContext can be implemented.