Now the company has been using struts2 previously used struts1.2.7, when you have a question in the use of
1. Struts1 the action is not only override the parent class Action's execute ()?
Because struts2 in action can be configured by the method struts.xml attribute to specify the requested action method.
In struts1 in total in the struts-config.xml, action configuration method only if there is no method
If not configured, then each action class can handle only one request, it did not need too many Action classes, and this is
struts2 than too much trouble.
: After a question in the Q & A channel, je were eager to help, this issue basically understand.
Action class need to inherit DispatherAction class, and then configure the struts-config.xml in the Action parameter = "method"
Request to be passed in the method name can be dealing with (such as / regYrdw.do? Method = checkUser).
But one thing:
As defined in the Action class
execute (...) method, when a request mdName method, continue to enforce the execute () method, rather than
When removing execute () method can execute correctly mdName () method.
That struts1, the default implementation of the request execute () method.
2. RpcDispathAction and DispatcherAction the difference?
Demo using the R ~, and D ~ and use it more?