?? struts 2的基石——攔截器(interceptor) - max on java - blogjava.htm
字號:
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="conversionError"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.StrutsConversionErrorInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="createSession"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.CreateSessionInterceptor"</SPAN>
<SPAN style="COLOR: #ff0000"></SPAN><SPAN style="COLOR: #0000ff">/></SPAN>
<SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN>
<SPAN style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="debugging"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.debugging.DebuggingInterceptor"</SPAN>
<SPAN style="COLOR: #ff0000"></SPAN><SPAN style="COLOR: #0000ff">/></SPAN>
<SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN>
<SPAN style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="external-ref"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.ExternalReferencesInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="execAndWait"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.ExecuteAndWaitInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="exception"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="fileUpload"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.FileUploadInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN style="COLOR: #0000ff">="i18n"</SPAN>
<SPAN style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.I18nInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN style="COLOR: #0000ff">="logger"</SPAN>
<SPAN style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.LoggingInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="model-driven"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="scoped-model-driven"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN style="COLOR: #0000ff">="params"</SPAN>
<SPAN style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.ParametersInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="prepare"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.PrepareInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="static-params"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN style="COLOR: #0000ff">="scope"</SPAN>
<SPAN style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.ScopeInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="servlet-config"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.ServletConfigInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="sessionAutowiring"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.spring.interceptor.SessionContextAutowiringInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN style="COLOR: #0000ff">="timer"</SPAN>
<SPAN style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.TimerInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN style="COLOR: #0000ff">="token"</SPAN>
<SPAN style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.TokenInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="token-session"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.TokenSessionStoreInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="validation"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.validator.ValidationInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="workflow"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor"</SPAN>
<SPAN style="COLOR: #0000ff">/></SPAN> <SPAN
style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN> <SPAN
style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN style="COLOR: #0000ff">="store"</SPAN>
<SPAN style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.MessageStoreInterceptor"</SPAN>
<SPAN style="COLOR: #ff0000"></SPAN><SPAN style="COLOR: #0000ff">/></SPAN>
<SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN>
<SPAN style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="checkbox"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.CheckboxInterceptor"</SPAN>
<SPAN style="COLOR: #ff0000"></SPAN><SPAN style="COLOR: #0000ff">/></SPAN>
<SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #0000ff"><</SPAN>
<SPAN style="COLOR: #800000">interceptor </SPAN><SPAN
style="COLOR: #ff0000">name</SPAN> <SPAN
style="COLOR: #0000ff">="profiling"</SPAN> <SPAN
style="COLOR: #ff0000">class</SPAN> <SPAN
style="COLOR: #0000ff">="org.apache.struts2.interceptor.ProfilingActivationInterceptor"</SPAN>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -