Learn notes for the action before the interceptor or after the interceptor. from
After the teacher's test ... Add breakpoints to each interceptor ...
Know:
The Action is executed at the time of the visit.
And the action is created before the params interceptor is executed.
So the conclusion is:
Action must precede the params interceptor. And the interceptor params is in the default-stacks position:
<interceptor-stack name= "Defaultstack" > <interceptor-ref name= "Exception"/>
<interceptor-ref name= "Alias"/> <interceptor-ref name= "ServletConfig"/> <interceptor-ref name= "i18n"/> <interceptor-ref name= "Prepare"/> <inter Ceptor-ref name= "Chain"/> <interceptor-ref name= "Scopedmodeldriven"/> <interce Ptor-ref name= "Modeldriven"/> <interceptor-ref name= "FileUpload"/> <intercepto R-ref name= "checkbox"/> <interceptor-ref name= "MultiSelect"/> <interceptor-ref Name= "Staticparams"/> <interceptor-ref name= "Actionmappingparams"/> <intercep
Tor-ref name= "params" > <param name= "excludeparams" >^action:.*,^method:.*</param> </interceptor-ref> <interceptor-ref name= "Conversionerror"/> <interceptor-ref name= "valid ation "> <param name=" excludemethods ">input,back,cancel,browse</param> & lt;/interceptor-ref> <interceptor-ref name= "Workflow" > <param name= "Exclud Emethods ">input,back,cancel,browse</param> </interceptor-ref> <intercept Or-ref name= "debugging"/> <interceptor-ref name= "deprecation"/> </interceptor-stac K>
so the conclusion:
Action must precede the params interceptor.
But some teachers say the action should first be loaded before the interceptor ....
So, all I know now is before the params, in the end, all the default interceptors are unknown. If there is more detailed, please share to me, thank you. Add:
Now I understand the order of the action and the Interceptor. I was doing struts upload when I know, if need to see my uploaded articles. can go to see (the attached link), remember is to see my struts2.xml configuration parameters.
http://blog.csdn.net/pengdongneng/article/details/50977705
Interceptors are useful every time a action is requested. That is, every request for an action in each struts.xml, the action is created first, and then the default defaultstack. So
Action precedes the Interceptor, not just the params interceptor. Summary: server startup, Interceptor Creation-"Initialize init access when the action is created and then entered into the interceptor in the Intercept method after the method in action, such as: Execute,getter ()