xwork / docs / wikidocs / XWork Interceptors.html

<html>
    <head>
        <title>XWork - 
        XWork Interceptors
         </title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <p>Interceptor is a core component with XWork2. XWork2 has been designed with action interception in mind from ground up. Basically and interceptor wrappes around XWork2 Action. It is cappable of influencing the overall result, and hence affecting which result eventually get executed. In the process it have access to XWork2 Action, its proxy (ActionProxy), ActionInvocation etc. such that the interceptor could inspect the internals of XWork2 before comming up with a overall conclusion of what it should do.</p>

<h3><a name="XWorkInterceptors-DefaultinterceptorsthatcomeswithXWork2"></a>Default interceptors that comes with XWork2</h3>

<div class="code"><div class="codeContent">
<pre class="code-xml"><span class="code-tag">&lt;interceptor name=<span class="code-quote">"timer"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.TimerInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"logger"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.LoggingInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"chain"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.ChainingInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"static-params"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"params"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.ParametersInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"filter-params"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"remove-params"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.ParameterRemoverInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"model-driven"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"scoped-model-driven"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"validation"</span> class=<span class="code-quote">"com.opensymphony.xwork2.validator.ValidationInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"workflow"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"prepare"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.PrepareInterceptor"</span>/&gt;</span>
       <span class="code-tag">&lt;interceptor name=<span class="code-quote">"conversionError"</span>  class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor"</span>/&gt;</span>
<span class="code-tag">&lt;interceptor name=<span class="code-quote">"alias"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.AliasInterceptor"</span>/&gt;</span>
<span class="code-tag">&lt;interceptor name=<span class="code-quote">"exception"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor"</span>/&gt;</span>
<span class="code-tag">&lt;interceptor name=<span class="code-quote">"i18n"</span> class=<span class="code-quote">"com.opensymphony.xwork2.interceptor.I18nInterceptor"</span>/&gt;</span></pre>
</div></div>

                    			    </td>
		    </tr>
	    </table>
    </body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.