This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/struts-site.git


The following commit(s) were added to refs/heads/asf-staging by this push:
     new 2e5808ec2 Updates stage by Jenkins
2e5808ec2 is described below

commit 2e5808ec266a600e8ef7ddb4394e9ec079a4aa1e
Author: jenkins <[email protected]>
AuthorDate: Sat Sep 12 07:54:14 2026 +0000

    Updates stage by Jenkins
---
 content/core-developers/alias-interceptor.html | 48 +++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/content/core-developers/alias-interceptor.html 
b/content/core-developers/alias-interceptor.html
index 60f0ad106..459a64744 100644
--- a/content/core-developers/alias-interceptor.html
+++ b/content/core-developers/alias-interceptor.html
@@ -164,9 +164,55 @@ is applied to has a setter named <code 
class="language-plaintext highlighter-rou
 <h2 id="parameters">Parameters</h2>
 
 <ul>
-  <li><code class="language-plaintext highlighter-rouge">aliasesKey</code> 
(optional) - the name of the action parameter to look for the alias map (by 
default this is aliases</li>
+  <li><code class="language-plaintext highlighter-rouge">aliasesKey</code> 
(optional) - the name of the action parameter to look for the alias map (by 
default this is <code class="language-plaintext 
highlighter-rouge">aliases</code>)</li>
 </ul>
 
+<h2 id="ordering-relative-to-the-params-interceptor">Ordering relative to the 
<code class="language-plaintext highlighter-rouge">params</code> 
interceptor</h2>
+
+<p>The interceptor sets the aliased property on the action at the moment it 
runs, and so does the <code class="language-plaintext 
highlighter-rouge">params</code> interceptor. 
+When a request carries both the source name and the target name, whichever of 
the two interceptors runs last wins:</p>
+
+<table>
+  <thead>
+    <tr>
+      <th>Stack order</th>
+      <th>Request <code class="language-plaintext 
highlighter-rouge">foo=1&amp;bar=2</code>, aliases <code 
class="language-plaintext highlighter-rouge">#{ 'foo' : 'bar' }</code></th>
+      <th><code class="language-plaintext highlighter-rouge">bar</code> after 
both have run</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td><code class="language-plaintext highlighter-rouge">alias</code> 
before <code class="language-plaintext highlighter-rouge">params</code> (the 
<code class="language-plaintext highlighter-rouge">defaultStack</code> 
order)</td>
+      <td><code class="language-plaintext highlighter-rouge">alias</code> sets 
<code class="language-plaintext highlighter-rouge">bar=1</code>, then <code 
class="language-plaintext highlighter-rouge">params</code> sets <code 
class="language-plaintext highlighter-rouge">bar=2</code></td>
+      <td><code class="language-plaintext highlighter-rouge">2</code> — the 
directly submitted parameter wins</td>
+    </tr>
+    <tr>
+      <td><code class="language-plaintext highlighter-rouge">params</code> 
before <code class="language-plaintext highlighter-rouge">alias</code></td>
+      <td><code class="language-plaintext highlighter-rouge">params</code> 
sets <code class="language-plaintext highlighter-rouge">bar=2</code>, then 
<code class="language-plaintext highlighter-rouge">alias</code> sets <code 
class="language-plaintext highlighter-rouge">bar=1</code></td>
+      <td><code class="language-plaintext highlighter-rouge">1</code> — the 
alias overrides the submitted parameter</td>
+    </tr>
+  </tbody>
+</table>
+
+<p>To make the alias override a directly submitted parameter, place <code 
class="language-plaintext highlighter-rouge">alias</code> after <code 
class="language-plaintext highlighter-rouge">params</code> in a custom stack. 
Keep it 
+before <code class="language-plaintext 
highlighter-rouge">conversionError</code> so that a conversion failure while 
binding the aliased property still becomes a field error:</p>
+
+<div class="language-xml highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code><span class="nt">&lt;interceptor-stack</span> <span 
class="na">name=</span><span class="s">"aliasOverridesStack"</span><span 
class="nt">&gt;</span>
+    <span class="nt">&lt;interceptor-ref</span> <span 
class="na">name=</span><span class="s">"exception"</span><span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;interceptor-ref</span> <span 
class="na">name=</span><span class="s">"servletConfig"</span><span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;interceptor-ref</span> <span 
class="na">name=</span><span class="s">"i18n"</span><span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;interceptor-ref</span> <span 
class="na">name=</span><span class="s">"staticParams"</span><span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;interceptor-ref</span> <span 
class="na">name=</span><span class="s">"actionMappingParams"</span><span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;interceptor-ref</span> <span 
class="na">name=</span><span class="s">"params"</span><span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;interceptor-ref</span> <span 
class="na">name=</span><span class="s">"alias"</span><span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;interceptor-ref</span> <span 
class="na">name=</span><span class="s">"conversionError"</span><span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;interceptor-ref</span> <span 
class="na">name=</span><span class="s">"validation"</span><span 
class="nt">/&gt;</span>
+    <span class="nt">&lt;interceptor-ref</span> <span 
class="na">name=</span><span class="s">"workflow"</span><span 
class="nt">/&gt;</span>
+<span class="nt">&lt;/interceptor-stack&gt;</span>
+</code></pre></div></div>
+
+<p>There is no <code class="language-plaintext 
highlighter-rouge">overwrite</code> flag on this interceptor; the ordering 
above is the supported way to get that behavior.</p>
+
 <h2 id="extending-the-interceptor">Extending the Interceptor</h2>
 
 <p>This interceptor does not have any known extension points.</p>

Reply via email to