Repository: struts-site Updated Branches: refs/heads/asf-site 950f032b7 -> 36e3e8378
Updates production by Jenkins Project: http://git-wip-us.apache.org/repos/asf/struts-site/repo Commit: http://git-wip-us.apache.org/repos/asf/struts-site/commit/36e3e837 Tree: http://git-wip-us.apache.org/repos/asf/struts-site/tree/36e3e837 Diff: http://git-wip-us.apache.org/repos/asf/struts-site/diff/36e3e837 Branch: refs/heads/asf-site Commit: 36e3e83783a1dc803f9b87f78dd67a2caea56050 Parents: 950f032 Author: jenkins <bui...@apache.org> Authored: Mon Jul 31 13:32:40 2017 +0000 Committer: jenkins <bui...@apache.org> Committed: Mon Jul 31 13:32:40 2017 +0000 ---------------------------------------------------------------------- .../core-developers/include-configuration.html | 29 +++------ .../interceptor-configuration.html | 66 ++++++++++---------- 2 files changed, 39 insertions(+), 56 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts-site/blob/36e3e837/content/core-developers/include-configuration.html ---------------------------------------------------------------------- diff --git a/content/core-developers/include-configuration.html b/content/core-developers/include-configuration.html index 45a61ae..e3ec8f1 100644 --- a/content/core-developers/include-configuration.html +++ b/content/core-developers/include-configuration.html @@ -126,15 +126,10 @@ <a href="index.html" title="back to Core Developers Guide"><< back to Core Developers Guide</a> <h1 id="include-configuration">Include Configuration</h1> -<p>A popular strategy is âdivide and conquerâ. The framework lets you apply âdivide and conquerâ to configuration files using the</p> +<p>A popular strategy is âdivide and conquerâ. The framework lets you apply âdivide and conquerâ to configuration files +using the <code class="highlighter-rouge"><include .../></code> element.</p> -<div class="highlighter-rouge"><pre class="highlight"><code><include .../> -</code></pre> -</div> -<p>element.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code> -<span class="cp"><!DOCTYPE struts PUBLIC +<div class="highlighter-rouge"><pre class="highlight"><code><span class="cp"><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"></span> <span class="nt"><struts></span> @@ -144,23 +139,13 @@ <span class="nt"><include</span> <span class="na">file=</span><span class="s">"/util/POJO.xml"</span><span class="nt">/></span> <span class="nt"><include</span> <span class="na">file=</span><span class="s">"/com/initech/admin/admin-struts.xml"</span><span class="nt">/></span> <span class="nt"></struts></span> - -</code></pre> -</div> - -<p>Each included file must be in the same format as</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>struts.xml -</code></pre> -</div> -<p>, including the</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>DOCTYPE </code></pre> </div> -<p>. The include files can be placed anywhere on the classpath and should be referred to by that path by the âfileâ attribute.</p> +<p>Each included file must be in the same format as <code class="highlighter-rouge">struts.xml</code>, including the <code class="highlighter-rouge">DOCTYPE</code>. The include files can be placed +anywhere on the classpath and should be referred to by that path by the âfileâ attribute.</p> -<p>In a large-team environment, the include files can be used to organize different modules of the application that are being developed by different team members.</p> +<p>In a large-team environment, the include files can be used to organize different modules of the application that are +being developed by different team members.</p> </section> </article> http://git-wip-us.apache.org/repos/asf/struts-site/blob/36e3e837/content/core-developers/interceptor-configuration.html ---------------------------------------------------------------------- diff --git a/content/core-developers/interceptor-configuration.html b/content/core-developers/interceptor-configuration.html index d3b554b..7845aec 100644 --- a/content/core-developers/interceptor-configuration.html +++ b/content/core-developers/interceptor-configuration.html @@ -126,7 +126,9 @@ <a href="index.html" title="back to Core Developers Guide"><< back to Core Developers Guide</a> <h1 id="interceptor-configuration">Interceptor Configuration</h1> -<p>Interceptors allow you to define code to be executed before and/or after the execution of an Action method. (The âFilterâ pattern.) Interceptors can be a powerful tool when developing applications. There are many, many use cases for Interceptors, including validation, property population, security, logging, and profiling.</p> +<p>Interceptors allow you to define code to be executed before and/or after the execution of an Action method. +(The âFilterâ pattern.) Interceptors can be a powerful tool when developing applications. There are many, many use cases +for Interceptors, including validation, property population, security, logging, and profiling.</p> <table> <thead> @@ -151,55 +153,51 @@ </tbody> </table> -<p>Interceptors can be chained together to create an Interceptor âStackâ. If an action neeeds to check the clientâs credentials, log the action, and time the action, all of these routines, and more, could be made part of the same Interceptor Stack.</p> +<p>Interceptors can be chained together to create an Interceptor âStackâ. If an action needs to check the clientâs +credentials, log the action, and time the action, all of these routines, and more, could be made part of the same +Interceptor Stack.</p> -<p>Interceptors are implemented as Java classes, so each Interceptor has a class name. To make it easier to reference Interceptors, each class can be registered with the framework and given a unique, simpler name.</p> +<p>Interceptors are implemented as Java classes, so each Interceptor has a class name. To make it easier to reference +Interceptors, each class can be registered with the framework and given a unique, simpler name.</p> <p><strong>Registering Interceptors</strong></p> -<div class="highlighter-rouge"><pre class="highlight"><code> -<interceptors> - <interceptor name="security" class="com.company.security.SecurityInterceptor"/> - <interceptor-stack name="secureStack"> - <interceptor-ref name="security"/> - <interceptor-ref name="defaultStack"/> - </interceptor-stack> -</interceptors> - +<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><interceptors></span> + <span class="nt"><interceptor</span> <span class="na">name=</span><span class="s">"security"</span> <span class="na">class=</span><span class="s">"com.company.security.SecurityInterceptor"</span><span class="nt">/></span> + <span class="nt"><interceptor-stack</span> <span class="na">name=</span><span class="s">"secureStack"</span><span class="nt">></span> + <span class="nt"><interceptor-ref</span> <span class="na">name=</span><span class="s">"security"</span><span class="nt">/></span> + <span class="nt"><interceptor-ref</span> <span class="na">name=</span><span class="s">"defaultStack"</span><span class="nt">/></span> + <span class="nt"></interceptor-stack></span> +<span class="nt"></interceptors></span> </code></pre> </div> -<p>(ok) Individual Interceptors and Interceptors Stacks can be âmixed and matchedâ in any order when defining an Interceptor Stack.</p> - -<p>(ok) The framework will invoke each Interceptor on the stack <strong>in the order it is defined</strong>.</p> - -<p>Most applications will define a default Interceptor Stack, such as</p> +<blockquote> + <p>Individual Interceptors and Interceptors Stacks can be âmixed and matchedâ in any order when defining an Interceptor Stack.</p> +</blockquote> -<div class="highlighter-rouge"><pre class="highlight"><code><default-interceptor-ref name="secureStack"/> -</code></pre> -</div> +<blockquote> + <p>The framework will invoke each Interceptor on the stack <strong>in the order it is defined</strong>.</p> +</blockquote> -<p>but any action may also define its own local stack.</p> +<p>Most applications will define a default Interceptor Stack, such as <code class="highlighter-rouge"><default-interceptor-ref name="secureStack"/></code> +but any action may also define its own local stack.</p> <p><strong>A local Interceptor Stack</strong></p> -<div class="highlighter-rouge"><pre class="highlight"><code> -<action name="VelocityCounter" class="org.apache.struts2.example.counter.SimpleCounter"> - <result name="success">...</result> - <interceptor-ref name="defaultComponentStack"/> -</action> - +<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><action</span> <span class="na">name=</span><span class="s">"VelocityCounter"</span> <span class="na">class=</span><span class="s">"org.apache.struts2.example.counter.SimpleCounter"</span><span class="nt">></span> + <span class="nt"><result</span> <span class="na">name=</span><span class="s">"success"</span><span class="nt">></span>...<span class="nt"></result></span> + <span class="nt"><interceptor-ref</span> <span class="na">name=</span><span class="s">"defaultComponentStack"</span><span class="nt">/></span> +<span class="nt"></action></span> </code></pre> </div> -<p>The default configuration (</p> - -<div class="highlighter-rouge"><pre class="highlight"><code> -</code></pre> -</div> -<p>) sets up a default Interceptor Stack that will work well for most applications.</p> +<p>The default configuration - <a href="struts-default-xml.html">struts-default.xml</a>; sets up a default Interceptor Stack that +will work well for most applications.</p> -<p>(light-on) For more, see <a href="interceptors.html">Interceptors</a>.</p> +<blockquote> + <p>For more, see <a href="interceptors.html">Interceptors</a>.</p> +</blockquote> </section> </article>