This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 49e121bbda Automatic Site Publish by Buildbot
49e121bbda is described below
commit 49e121bbda0fb0e26179d915e2dd2aa3f00fb70d
Author: buildbot <[email protected]>
AuthorDate: Wed Dec 2 15:40:46 2026 +0000
Automatic Site Publish by Buildbot
---
output/core-developers/action-chaining.html | 5 +
output/core-developers/chain-result.html | 4 +
output/core-developers/chaining-interceptor.html | 4 +
output/core-developers/default-properties.html | 4 +
output/core-developers/forward-result.html | 418 +++++++++++++++++++++++
output/core-developers/interceptors.html | 5 +
output/core-developers/result-types.html | 4 +
output/plugins/convention/index.html | 5 +
8 files changed, 449 insertions(+)
diff --git a/output/core-developers/action-chaining.html
b/output/core-developers/action-chaining.html
index a6750aa95e..4a766dfe6d 100644
--- a/output/core-developers/action-chaining.html
+++ b/output/core-developers/action-chaining.html
@@ -162,6 +162,11 @@ with a <a href="chaining-interceptor">Chaining
Interceptor</a>.</p>
<p>As a rule, Action Chaining is not recommended. First explore other
options, such as the <code class="language-plaintext
highlighter-rouge">Redirect After Post</code> technique.</p>
</blockquote>
+<p class="alert alert-info">Since Struts 7.6.0, use the <a
href="forward-result">Forward Result</a> for a server-side transfer between
actions. It runs only
+targets that opted in, gives the target a fresh value stack and hands off only
values named on both sides. Action
+chaining is planned to be deprecated in Struts 7.7.0 and removed in Struts
8.0.0, see
+<a href="forward-result#migrating-from-chain">Migrating from chain</a>.</p>
+
<h2 id="chain-result">Chain Result</h2>
<p>The <a href="chain-result">Chain Result</a> is a result type that invokes
an Action with its own Interceptor Stack and Result.
diff --git a/output/core-developers/chain-result.html
b/output/core-developers/chain-result.html
index 6f9b46de2b..152a0db378 100644
--- a/output/core-developers/chain-result.html
+++ b/output/core-developers/chain-result.html
@@ -154,6 +154,10 @@
<h1 id="chain-result">Chain Result</h1>
+<p class="alert alert-info">Since Struts 7.6.0 the <a
href="forward-result">Forward Result</a> is the recommended replacement: the
target must opt in and
+only explicitly named values cross over. <code class="language-plaintext
highlighter-rouge">chain</code> is planned to be deprecated in Struts 7.7.0 and
removed in Struts 8.0.0,
+see <a href="forward-result#migrating-from-chain">Migrating from chain</a>.</p>
+
<p>This result invokes an entire other action, complete with it’s own
interceptor stack and result.</p>
<h2 id="parameters">Parameters</h2>
diff --git a/output/core-developers/chaining-interceptor.html
b/output/core-developers/chaining-interceptor.html
index 23a0ef8de3..10ec89b2dc 100644
--- a/output/core-developers/chaining-interceptor.html
+++ b/output/core-developers/chaining-interceptor.html
@@ -154,6 +154,10 @@
<h1 id="chaining-interceptor">Chaining Interceptor</h1>
+<p class="alert alert-info">Since Struts 7.6.0, the <a
href="forward-result">Forward Result</a> replaces chaining. Instead of copying
every property, it hands
+off only the values listed in its <code class="language-plaintext
highlighter-rouge">pass</code> parameter, to setters annotated with <code
class="language-plaintext highlighter-rouge">@ForwardParameter</code>, through
the
+<code class="language-plaintext highlighter-rouge">forwardParams</code>
interceptor.</p>
+
<h2 id="description">Description</h2>
<p>An interceptor that copies all the properties of every object in the value
stack to the currently executing object,
diff --git a/output/core-developers/default-properties.html
b/output/core-developers/default-properties.html
index 3d1b9afe81..cfca22356f 100644
--- a/output/core-developers/default-properties.html
+++ b/output/core-developers/default-properties.html
@@ -463,6 +463,10 @@ struts.parameters.requireAnnotations=true
### Whether to drop @StrutsParameter annotation requirement on simple setter
methods
### Useful for transitioning legacy applications, but highly recommended to
set to false as soon as possible!
struts.parameters.requireAnnotations.transitionMode=false
+### Whether ParametersInterceptor also checks @StrutsParameter on the member
OGNL actually resolves while binding
+### each parameter, not only on the member the name is predicted to reach.
Opt-in hardening; default false keeps
+### binding as it is. Only has effect when
struts.parameters.requireAnnotations is also enabled.
+struts.parameters.requireAnnotations.enforceOnResolvedMember=false
### Whether ChainingInterceptor and AliasInterceptor enforce @StrutsParameter
on the target action when
### copying a value already resolved on the stack. Opt-in hardening; default
false preserves legacy
diff --git a/output/core-developers/forward-result.html
b/output/core-developers/forward-result.html
new file mode 100644
index 0000000000..5095c364b2
--- /dev/null
+++ b/output/core-developers/forward-result.html
@@ -0,0 +1,418 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+ <meta name="Date-Revision-yyyymmdd" content="20140918"/>
+ <meta http-equiv="Content-Language" content="en"/>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+
+ <title>Forward Result</title>
+
+ <link href="/css/source-sans-pro.css" rel="stylesheet" type="text/css">
+ <link href="/css/font-awesome.css" rel="stylesheet">
+ <link href="/css/main.css" rel="stylesheet">
+ <link href="/css/custom.css" rel="stylesheet">
+ <link href="/css/syntax.css" rel="stylesheet">
+
+ <script src="/js/jquery-1.11.0.min.js"></script>
+ <script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script>
+ <script type="text/javascript" src="/js/community.js"></script>
+
+ <!-- Matomo -->
+ <script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before
"trackPageView" */
+ /* We explicitly disable cookie tracking to avoid privacy issues */
+ _paq.push(['disableCookies']);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="//analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '41']);
+ var d=document, g=d.createElement('script'),
s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+ </script>
+ <!-- End Matomo Code -->
+</head>
+<body>
+
+<a href="https://github.com/apache/struts" class="github-ribbon">
+ <img decoding="async" loading="lazy" style="position: absolute; right: 0;
border: 0;" width="149" height="149"
src="/img/forkme_right_red_aa0000.webp?resize=149%2C149" class="attachment-full
size-full" alt="Fork me on GitHub" data-recalc-dims="1">
+</a>
+
+<header>
+ <nav>
+ <div role="navigation" class="navbar navbar-default navbar-fixed-top">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" data-toggle="collapse"
data-target="#struts-menu" class="navbar-toggle">
+ Menu
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a href="/index.html" class="navbar-brand logo"><img
src="/img/struts-logo.svg"></a>
+ </div>
+ <div id="struts-menu" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li class="dropdown">
+ <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+ Home<b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="/index.html">Welcome</a></li>
+ <li><a href="/download.cgi">Download</a></li>
+ <li><a href="/releases.html">Releases</a></li>
+ <li><a href="/announce-2026.html">Announcements</a></li>
+ <li><a href="http://www.apache.org/licenses/">License</a></li>
+ <li><a
href="https://www.apache.org/foundation/thanks.html">Thanks!</a></li>
+ <li><a
href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+ <li><a
href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy
Policy</a></li>
+ </ul>
+ </li>
+ <li class="dropdown">
+ <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+ Support<b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="/mail.html">User Mailing List</a></li>
+ <li><a href="https://issues.apache.org/jira/browse/WW">Issue
Tracker</a></li>
+ <li><a href="/security.html">Reporting Security Issues</a></li>
+ <li><a href="/commercial-support.html">Commercial
Support</a></li>
+ <li><a href="/eol-versions.html">End-of-Life Versions</a></li>
+ <li class="divider"></li>
+ <li><a
href="https://cwiki.apache.org/confluence/display/WW/Migration+Guide">Version
Notes</a></li>
+ <li><a
href="https://cwiki.apache.org/confluence/display/WW/Security+Bulletins">Security
Bulletins</a></li>
+ <li><a href="/idea-plugin">IntelliJ IDEA plugin</a></li>
+ <li class="divider"></li>
+ <li><a href="/maven/project-info.html">Maven Project
Info</a></li>
+ <li><a href="/maven/struts2-core/dependencies.html">Struts
Core Dependencies</a></li>
+ <li><a href="/maven/struts2-plugins/modules.html">Plugin
Dependencies</a></li>
+ </ul>
+ </li>
+ <li class="dropdown">
+ <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+ Documentation<b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="/birdseye.html">Birds Eye</a></li>
+ <li><a href="/primer.html">Key Technologies</a></li>
+ <li><a href="/kickstart.html">Kickstart FAQ</a></li>
+ <li><a
href="https://cwiki.apache.org/confluence/display/WW/Home">Wiki</a></li>
+ <li class="divider"></li>
+ <li><a href="/getting-started/">Getting Started</a></li>
+ <li><a href="/security/">Security Guide</a></li>
+ <li><a href="/core-developers/">Core Developers Guide</a></li>
+ <li><a href="/tag-developers/">Tag Developers Guide</a></li>
+ <li><a href="/maven-archetypes/">Maven Archetypes</a></li>
+ <li><a href="/plugins/">Plugins</a></li>
+ <li><a href="/maven/struts2-core/apidocs/index.html">Struts
Core API</a></li>
+ <li><a href="/tag-developers/tag-reference.html">Tag
reference</a></li>
+ <li><a
href="https://cwiki.apache.org/confluence/display/WW/FAQs">FAQs</a></li>
+ <li><a
href="http://cwiki.apache.org/S2PLUGINS/home.html">Plugin registry</a></li>
+ </ul>
+ </li>
+ <li class="dropdown">
+ <a data-toggle="dropdown" href="#" class="dropdown-toggle">
+ Contributing<b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="/youatstruts.html">You at Struts</a></li>
+ <li><a href="/helping.html">How to Help FAQ</a></li>
+ <li><a href="/dev-mail.html">Development Lists</a></li>
+ <li class="divider"></li>
+ <li><a href="/submitting-patches.html">Submitting
patches</a></li>
+ <li><a href="/builds.html">Source Code and Builds</a></li>
+ <li><a href="/coding-standards.html">Coding standards</a></li>
+ <li><a href="/contributors/">Contributors Guide</a></li>
+ <li class="divider"></li>
+ <li><a href="/release-guidelines.html">Release
Guidelines</a></li>
+ <li><a href="/bylaws.html">PMC Charter</a></li>
+ <li><a href="/volunteers.html">Volunteers</a></li>
+ <li><a
href="https://gitbox.apache.org/repos/asf?p=struts.git">Source
Repository</a></li>
+ <li><a href="/updating-website.html">Updating the
website</a></li>
+ </ul>
+ </li>
+ <li class="apache"><a href="http://www.apache.org/"><img
src="/img/apache.png"></a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </nav>
+</header>
+
+
+<article class="container">
+ <section class="col-md-12">
+ <a class="edit-on-gh"
href="https://github.com/apache/struts-site/edit/main/source/core-developers/forward-result.md"
title="Edit this page on GitHub">Edit on GitHub</a>
+
+ <a href="result-types" title="back to Result types"><< back to Result
types</a>
+
+ <h1 class="no_toc" id="forward-result">Forward Result</h1>
+
+<blockquote>
+ <p>Since Struts 7.6.0</p>
+</blockquote>
+
+<ul id="markdown-toc">
+ <li><a href="#description" id="markdown-toc-description">Description</a></li>
+ <li><a href="#parameters" id="markdown-toc-parameters">Parameters</a></li>
+ <li><a href="#example" id="markdown-toc-example">Example</a></li>
+ <li><a href="#opting-in-a-target"
id="markdown-toc-opting-in-a-target">Opting in a target</a></li>
+ <li><a href="#what-the-target-sees"
id="markdown-toc-what-the-target-sees">What the target sees</a></li>
+ <li><a href="#handing-off-values"
id="markdown-toc-handing-off-values">Handing off values</a></li>
+ <li><a href="#depth-limit" id="markdown-toc-depth-limit">Depth limit</a></li>
+ <li><a href="#startup-checks" id="markdown-toc-startup-checks">Startup
checks</a></li>
+ <li><a href="#convention-plugin"
id="markdown-toc-convention-plugin">Convention plugin</a></li>
+ <li><a href="#interaction-with-other-interceptors"
id="markdown-toc-interaction-with-other-interceptors">Interaction with other
interceptors</a></li>
+ <li><a href="#migrating-from-chain"
id="markdown-toc-migrating-from-chain">Migrating from chain</a></li>
+</ul>
+
+<h2 id="description">Description</h2>
+
+<p>The <code class="language-plaintext highlighter-rouge">forward</code>
result runs another action in the same request, without a round-trip to the
browser. The source action
+picks the branch by returning a result code, and the target action’s own
result renders the response. It is the
+replacement for <a href="action-chaining">Action Chaining</a>: unlike <code
class="language-plaintext highlighter-rouge">chain</code>, both boundaries of
the transfer are explicit.</p>
+
+<ul>
+ <li><strong>Which actions can be forwarded to:</strong> only actions that
opted in as a forward target.</li>
+ <li><strong>What data crosses:</strong> only values the source names and the
target accepts. The target gets a fresh value stack,
+so the source action is not visible to it or to its result.</li>
+</ul>
+
+<p>Do not confuse it with the <a href="dispatcher-result">Dispatcher
Result</a>, which is a servlet forward to a resource such as
+a JSP. The <code class="language-plaintext highlighter-rouge">forward</code>
result runs a whole action, with its own interceptor stack and result.</p>
+
+<h2 id="parameters">Parameters</h2>
+
+<ul>
+ <li><code class="language-plaintext highlighter-rouge">actionName</code>
(default) - the name of the target action. It must be a literal.</li>
+ <li><code class="language-plaintext highlighter-rouge">namespace</code> -
the target’s namespace. It must be a literal. If omitted, it defaults to the
namespace of the package
+the source action is declared in.</li>
+ <li><code class="language-plaintext highlighter-rouge">method</code> - the
method to invoke on the target. It must be a literal. If omitted, the target’s
configured method is used.</li>
+ <li><code class="language-plaintext highlighter-rouge">pass</code> - a
comma-separated list of the source action’s properties to hand off to the
target, see
+<a href="#handing-off-values">Handing off values</a>.</li>
+</ul>
+
+<p>Targets are never computed from data: <code class="language-plaintext
highlighter-rouge">${...}</code> and <code class="language-plaintext
highlighter-rouge">%{...}</code> expressions are not evaluated, and
placeholders like <code class="language-plaintext highlighter-rouge">{1}</code>
+from a wildcard or regex action mapping are not substituted. Such a value
fails the configuration at startup.</p>
+
+<h2 id="example">Example</h2>
+
+<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><package</span> <span
class="na">name=</span><span class="s">"shop"</span> <span
class="na">extends=</span><span class="s">"struts-default"</span><span
class="nt">></span>
+ <span class="nt"><action</span> <span class="na">name=</span><span
class="s">"order"</span> <span class="na">class=</span><span
class="s">"com.example.OrderAction"</span><span class="nt">></span>
+ <span class="nt"><result</span> <span class="na">name=</span><span
class="s">"success"</span><span class="nt">></span>/WEB-INF/order.jsp<span
class="nt"></result></span>
+ <span class="nt"><result</span> <span class="na">name=</span><span
class="s">"invoice"</span> <span class="na">type=</span><span
class="s">"forward"</span><span class="nt">></span>
+ <span class="nt"><param</span> <span
class="na">name=</span><span class="s">"actionName"</span><span
class="nt">></span>invoice<span class="nt"></param></span>
+ <span class="nt"><param</span> <span
class="na">name=</span><span class="s">"pass"</span><span
class="nt">></span>orderId<span class="nt"></param></span>
+ <span class="nt"></result></span>
+ <span class="nt"></action></span>
+
+ <span class="nt"><action</span> <span class="na">name=</span><span
class="s">"invoice"</span> <span class="na">class=</span><span
class="s">"com.example.InvoiceAction"</span><span class="nt">></span>
+ <span class="nt"><result></span>/WEB-INF/invoice.jsp<span
class="nt"></result></span>
+ <span class="nt"></action></span>
+<span class="nt"></package></span>
+</code></pre></div></div>
+
+<div class="language-java highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nd">@ForwardTarget</span>
+<span class="kd">public</span> <span class="kd">class</span> <span
class="nc">InvoiceAction</span> <span class="kd">extends</span> <span
class="nc">ActionSupport</span> <span class="o">{</span>
+
+ <span class="kd">private</span> <span class="nc">Long</span> <span
class="n">orderId</span><span class="o">;</span>
+
+ <span class="nd">@ForwardParameter</span>
+ <span class="kd">public</span> <span class="kt">void</span> <span
class="nf">setOrderId</span><span class="o">(</span><span
class="nc">Long</span> <span class="n">orderId</span><span class="o">)</span>
<span class="o">{</span>
+ <span class="k">this</span><span class="o">.</span><span
class="na">orderId</span> <span class="o">=</span> <span
class="n">orderId</span><span class="o">;</span>
+ <span class="o">}</span>
+
+ <span class="kd">public</span> <span class="nc">Long</span> <span
class="nf">getOrderId</span><span class="o">()</span> <span class="o">{</span>
+ <span class="k">return</span> <span class="n">orderId</span><span
class="o">;</span>
+ <span class="o">}</span>
+<span class="o">}</span>
+</code></pre></div></div>
+
+<p>When <code class="language-plaintext highlighter-rouge">OrderAction</code>
returns <code class="language-plaintext highlighter-rouge">invoice</code>,
<code class="language-plaintext highlighter-rouge">InvoiceAction</code> runs in
the same request with <code class="language-plaintext
highlighter-rouge">orderId</code> handed off, and
+<code class="language-plaintext highlighter-rouge">invoice.jsp</code> renders
against <code class="language-plaintext
highlighter-rouge">InvoiceAction</code>.</p>
+
+<h2 id="opting-in-a-target">Opting in a target</h2>
+
+<p>An action can only be forwarded to if it is marked as a forward target.
Everything else is refused, the same
+allowlist model as <a href="struts-parameter-annotation">@StrutsParameter</a>
uses for request parameters.
+There are two equivalent ways:</p>
+
+<ul>
+ <li>Annotate the class with <code class="language-plaintext
highlighter-rouge">@org.apache.struts2.forward.ForwardTarget</code>. The
annotation is not inherited, so
+a base class cannot opt in all its subclasses. It is read from the class
behind a Spring proxy.</li>
+ <li>Set <code class="language-plaintext
highlighter-rouge">forward-target="true"</code> on the <code
class="language-plaintext highlighter-rouge"><action></code> element. Use
this form for classes you cannot annotate. The attribute
+needs the 7.6 DTD:</li>
+</ul>
+
+<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="cp"><!DOCTYPE struts PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 7.6//EN"
+ "https://struts.apache.org/dtds/struts-7.6.dtd"></span>
+</code></pre></div></div>
+
+<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><action</span> <span
class="na">name=</span><span class="s">"invoice"</span> <span
class="na">class=</span><span class="s">"com.example.InvoiceAction"</span>
<span class="na">forward-target=</span><span class="s">"true"</span><span
class="nt">></span>
+ <span class="nt"><result></span>/WEB-INF/invoice.jsp<span
class="nt"></result></span>
+<span class="nt"></action></span>
+</code></pre></div></div>
+
+<p>Opting in matters even though the hand-off is explicit. A forward bypasses
everything mapped to the target’s URL,
+such as <code class="language-plaintext highlighter-rouge">web.xml</code>
security constraints, servlet filters and container authentication. Only the
target’s own
+interceptors run.</p>
+
+<p>Forwarding to an action that has not opted in throws an exception. So does
forwarding to a name that does not exist,
+even when the namespace defines a <code class="language-plaintext
highlighter-rouge">default-action-ref</code>.</p>
+
+<h2 id="what-the-target-sees">What the target sees</h2>
+
+<ul>
+ <li><strong>A fresh value stack and its own <code class="language-plaintext
highlighter-rouge">ActionContext</code>.</strong> The source action is not on
the target’s stack. Action errors,
+field errors and messages do not carry over unless you hand them off
explicitly.</li>
+ <li><strong>The same request.</strong> The target sees the same request,
session, application, locale and action mapping. Request
+parameters are bound again by the target’s <code class="language-plaintext
highlighter-rouge">params</code> interceptor, under the target’s own <code
class="language-plaintext highlighter-rouge">@StrutsParameter</code> rules,
+like a servlet forward.</li>
+ <li><strong>Its full interceptor stack.</strong> Security and HTTP-method
interceptors see the original request.</li>
+</ul>
+
+<h2 id="handing-off-values">Handing off values</h2>
+
+<p>The source lists the properties it hands off in <code
class="language-plaintext highlighter-rouge">pass</code>. Each one is read
through the source action’s getter; the
+names are simple property names, never expressions. The target accepts a value
only on a top-level setter annotated
+with <code class="language-plaintext
highlighter-rouge">@org.apache.struts2.forward.ForwardParameter</code>. Nested
paths and the <code class="language-plaintext
highlighter-rouge">ModelDriven</code> model are not supported.</p>
+
+<p>Hand-off values are applied by the <code class="language-plaintext
highlighter-rouge">forwardParams</code> interceptor, which runs directly after
<code class="language-plaintext highlighter-rouge">params</code> in every stack
+shipped with the framework: <code class="language-plaintext
highlighter-rouge">basicStack</code>, <code class="language-plaintext
highlighter-rouge">defaultStack</code>, <code class="language-plaintext
highlighter-rouge">paramsPrepareParamsStack</code> (after the second <code
class="language-plaintext highlighter-rouge">params</code>),
+and the REST and Bean Validation plugin stacks.</p>
+
+<ul>
+ <li>When a request parameter and a handed-off value set the same property,
the handed-off value wins.</li>
+ <li>A value the target does not accept, or one that cannot be converted to
the setter’s type, is dropped and logged
+at WARN.</li>
+ <li>A forward that hands off values to a target whose stack has no <code
class="language-plaintext highlighter-rouge">forwardParams</code> interceptor
throws, rather than
+silently dropping them. If your target uses a custom stack, add <code
class="language-plaintext highlighter-rouge"><interceptor-ref
name="forwardParams"/></code> after <code class="language-plaintext
highlighter-rouge">params</code>.</li>
+</ul>
+
+<p class="alert alert-info">Handed-off values arrive after <code
class="language-plaintext highlighter-rouge">prepare</code>, so <code
class="language-plaintext highlighter-rouge">Preparable.prepare()</code> cannot
use them yet. Load data that depends on a
+handed-off value in the action method instead.</p>
+
+<h2 id="depth-limit">Depth limit</h2>
+
+<p>Nested forwards in one request are limited by the <code
class="language-plaintext highlighter-rouge">struts.forward.maxDepth</code>
constant, which defaults to <code class="language-plaintext
highlighter-rouge">5</code>.
+Exceeding it throws an exception. The limit also holds when forwards and
chains are mixed in a loop.</p>
+
+<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><constant</span> <span
class="na">name=</span><span class="s">"struts.forward.maxDepth"</span> <span
class="na">value=</span><span class="s">"3"</span><span class="nt">/></span>
+</code></pre></div></div>
+
+<h2 id="startup-checks">Startup checks</h2>
+
+<p>Because targets are static, the configuration is checked when the
application starts:</p>
+
+<ul>
+ <li>A target, namespace or method that is not a literal, or an invalid <code
class="language-plaintext highlighter-rouge">pass</code> name, always fails
startup.</li>
+ <li>A missing target, a target that has not opted in, a hand-off to a target
without the <code class="language-plaintext
highlighter-rouge">forwardParams</code> interceptor,
+and a cycle of forwards are logged at WARN. In <a
href="development-mode">devMode</a> they fail startup.</li>
+</ul>
+
+<h2 id="convention-plugin">Convention plugin</h2>
+
+<p>The <a href="../plugins/convention/">Convention plugin</a> transfers from
action <code class="language-plaintext highlighter-rouge">foo</code> to <code
class="language-plaintext highlighter-rouge">foo-bar</code> when <code
class="language-plaintext highlighter-rouge">foo</code> returns <code
class="language-plaintext highlighter-rouge">bar</code>
+and has no matching result. When <code class="language-plaintext
highlighter-rouge">foo-bar</code> has opted in as a forward target, this
transfer is a <code class="language-plaintext
highlighter-rouge">forward</code>. Otherwise
+it is still a <code class="language-plaintext highlighter-rouge">chain</code>,
as before. The implicit forward hands off no values, only request
parameters.</p>
+
+<p>To hand off values, declare the result explicitly:</p>
+
+<div class="language-java highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nd">@Action</span><span
class="o">(</span><span class="n">value</span> <span class="o">=</span> <span
class="s">"foo"</span><span class="o">,</span> <span class="n">results</span>
<span class="o">=</span> <span class="o">{</span>
+ <span class="nd">@Result</span><span class="o">(</span><span
class="n">name</span> <span class="o">=</span> <span
class="s">"bar"</span><span class="o">,</span> <span class="n">type</span>
<span class="o">=</span> <span class="s">"forward"</span><span
class="o">,</span> <span class="n">location</span> <span class="o">=</span>
<span class="s">"foo-bar"</span><span class="o">,</span> <span
class="n">params</span> <span class="o">=</span> <span class="o">{</span><span
class="s">"pass"</ [...]
+<span class="o">})</span>
+</code></pre></div></div>
+
+<h2 id="interaction-with-other-interceptors">Interaction with other
interceptors</h2>
+
+<ul>
+ <li>Put <code class="language-plaintext highlighter-rouge">token</code> or
<code class="language-plaintext highlighter-rouge">tokenSession</code> on the
source action. A replayed duplicate submit renders the target’s result again
+without running the target a second time.</li>
+ <li><code class="language-plaintext highlighter-rouge">execAndWait</code>
keys its background job to the action it runs on. With <code
class="language-plaintext highlighter-rouge">execAndWait</code> on the target,
the wait page
+polls the source action’s URL, so each poll goes through the source action
again before reaching the target.
+Prefer putting <code class="language-plaintext
highlighter-rouge">execAndWait</code> on the source.</li>
+ <li>After the forward returns, filters such as SiteMesh decorators see the
source action’s value stack, not the target’s.</li>
+</ul>
+
+<h2 id="migrating-from-chain">Migrating from chain</h2>
+
+<p>The <code class="language-plaintext highlighter-rouge">chain</code> result
is planned to be deprecated in Struts 7.7.0 and removed in Struts 8.0.0. To
move a chain to
+a forward:</p>
+
+<ol>
+ <li>Opt in the target action with <code class="language-plaintext
highlighter-rouge">@ForwardTarget</code> or <code class="language-plaintext
highlighter-rouge">forward-target="true"</code>.</li>
+ <li>If the target relied on properties copied by the <a
href="chaining-interceptor">Chaining Interceptor</a>, list them in <code
class="language-plaintext highlighter-rouge">pass</code>
+on the source’s result and annotate the target’s setters with <code
class="language-plaintext highlighter-rouge">@ForwardParameter</code>. Many
chains need no hand-off at
+all, because request parameters are bound again.</li>
+ <li>Change <code class="language-plaintext
highlighter-rouge">type="chain"</code> to <code class="language-plaintext
highlighter-rouge">type="forward"</code>. Remove parameters that only <code
class="language-plaintext highlighter-rouge">chain</code> accepts, such as
<code class="language-plaintext highlighter-rouge">skipActions</code>:
+an unknown parameter fails on a <code class="language-plaintext
highlighter-rouge">forward</code> result. Replace any <code
class="language-plaintext highlighter-rouge">${...}</code> expression in <code
class="language-plaintext highlighter-rouge">actionName</code>, <code
class="language-plaintext highlighter-rouge">namespace</code>
+or <code class="language-plaintext highlighter-rouge">method</code> with a
literal, and use one <code class="language-plaintext
highlighter-rouge">forward</code> result per result code instead. If <code
class="language-plaintext highlighter-rouge">namespace</code> is omitted,
+<code class="language-plaintext highlighter-rouge">chain</code> uses the
namespace of the current request while <code class="language-plaintext
highlighter-rouge">forward</code> uses the namespace of the source action’s
+package; set <code class="language-plaintext
highlighter-rouge">namespace</code> explicitly where the two differ, for
example with a wildcard namespace or the
+empty-namespace fallback.</li>
+ <li>Remove the <code class="language-plaintext
highlighter-rouge">chain</code> interceptor reference from the target’s stack
if you added one.</li>
+</ol>
+
+<p>Before:</p>
+
+<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><action</span> <span
class="na">name=</span><span class="s">"createAccount"</span> <span
class="na">class=</span><span class="s">"..."</span><span class="nt">></span>
+ <span class="nt"><result</span> <span class="na">type=</span><span
class="s">"chain"</span><span class="nt">></span>login<span
class="nt"></result></span>
+<span class="nt"></action></span>
+<span class="nt"><action</span> <span class="na">name=</span><span
class="s">"login"</span> <span class="na">class=</span><span
class="s">"..."</span><span class="nt">></span>
+ <span class="nt"><interceptor-ref</span> <span
class="na">name=</span><span class="s">"chain"</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"><result></span>/WEB-INF/login.jsp<span
class="nt"></result></span>
+<span class="nt"></action></span>
+</code></pre></div></div>
+
+<p>After, with a <code class="language-plaintext
highlighter-rouge">getUsername()</code> getter on the <code
class="language-plaintext highlighter-rouge">createAccount</code> action and a
setter annotated with <code class="language-plaintext
highlighter-rouge">@ForwardParameter</code>
+on the <code class="language-plaintext highlighter-rouge">login</code> action
(without that setter the value is dropped and logged at WARN):</p>
+
+<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><action</span> <span
class="na">name=</span><span class="s">"createAccount"</span> <span
class="na">class=</span><span class="s">"..."</span><span class="nt">></span>
+ <span class="nt"><result</span> <span class="na">type=</span><span
class="s">"forward"</span><span class="nt">></span>
+ <span class="nt"><param</span> <span class="na">name=</span><span
class="s">"actionName"</span><span class="nt">></span>login<span
class="nt"></param></span>
+ <span class="nt"><param</span> <span class="na">name=</span><span
class="s">"pass"</span><span class="nt">></span>username<span
class="nt"></param></span>
+ <span class="nt"></result></span>
+<span class="nt"></action></span>
+<span class="nt"><action</span> <span class="na">name=</span><span
class="s">"login"</span> <span class="na">class=</span><span
class="s">"..."</span> <span class="na">forward-target=</span><span
class="s">"true"</span><span class="nt">></span>
+ <span class="nt"><result></span>/WEB-INF/login.jsp<span
class="nt"></result></span>
+<span class="nt"></action></span>
+</code></pre></div></div>
+
+ </section>
+</article>
+
+
+<footer class="container">
+ <div class="col-md-12">
+ Copyright © 2000-2025 <a href="https://www.apache.org/">The Apache
Software Foundation</a>.
+ Apache Struts, Struts, Apache, the Apache feather logo, and the Apache
Struts project logos are
+ trademarks of The Apache Software Foundation. All Rights Reserved.
+ </div>
+ <div class="col-md-12">Logo and website design donated by <a
href="https://softwaremill.com/">SoftwareMill</a>.</div>
+</footer>
+
+<a href="https://twitter.com/x?ref_src=twsrc%5Etfw"
class="twitter-follow-button" data-show-count="false">Follow @x</a>
+<script async src="/js/twitter-widgets.js" charset="utf-8"></script>
+
+<div id="fb-root"></div>
+
+<script>(function (d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) return;
+ js = d.createElement(s);
+ js.id = id;
+ js.src = "/js/facebook-all.js";
+ fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));</script>
+
+
+</body>
+</html>
diff --git a/output/core-developers/interceptors.html
b/output/core-developers/interceptors.html
index 325013d9ce..ec13b641d3 100644
--- a/output/core-developers/interceptors.html
+++ b/output/core-developers/interceptors.html
@@ -637,6 +637,11 @@ specified in the <code class="language-plaintext
highlighter-rouge"><intercep
<td>fileUpload</td>
<td><strong>DEPRECTED</strong> since Struts 6.4.0,
<strong>REMOVED</strong> since Struts 7.0.0: an Interceptor that adds easy
access to file upload support.</td>
</tr>
+ <tr>
+ <td><a href="forward-result#handing-off-values">Forward Parameters
Interceptor</a></td>
+ <td>forwardParams</td>
+ <td>Available since Struts 7.6.0: applies the values handed off by a <a
href="forward-result">Forward Result</a> to setters annotated with <code
class="language-plaintext highlighter-rouge">@ForwardParameter</code>.</td>
+ </tr>
<tr>
<td><a href="i18n-interceptor">I18n Interceptor</a></td>
<td>i18n</td>
diff --git a/output/core-developers/result-types.html
b/output/core-developers/result-types.html
index beaf4f70ee..c4a19cc0be 100644
--- a/output/core-developers/result-types.html
+++ b/output/core-developers/result-types.html
@@ -183,6 +183,10 @@ own applications.</p>
<td><a href="dispatcher-result">Dispatcher Result</a></td>
<td>Used for web resource integration, including <em>JSP</em>
integration</td>
</tr>
+ <tr>
+ <td><a href="forward-result">Forward Result</a></td>
+ <td>Used to run another, opted-in action in the same request (since
Struts 7.6.0), the replacement for <a href="action-chaining">Action
Chaining</a></td>
+ </tr>
<tr>
<td><a href="freemarker-result">FreeMarker Result</a></td>
<td>Used for <em>FreeMarker</em> integration</td>
diff --git a/output/plugins/convention/index.html
b/output/plugins/convention/index.html
index 798b79da62..9aab9cc490 100644
--- a/output/plugins/convention/index.html
+++ b/output/plugins/convention/index.html
@@ -492,6 +492,11 @@ doesn’t have any result defined for that code. In the
following example:</p>
“foo-bar” on the same package where “foo” is defined. If such an action is
found, it will be invoked using
the “chain” result.</p>
+<p>Since Struts 7.6.0, if “foo-bar” has opted in as a forward target (with
<code class="language-plaintext highlighter-rouge">@ForwardTarget</code> on its
class), it is invoked
+using the <a href="../../core-developers/forward-result">Forward Result</a>
instead. The implicit forward hands off no values,
+only request parameters; see <a
href="../../core-developers/forward-result#convention-plugin">Convention
plugin</a> for how
+to hand off values with an explicit <code class="language-plaintext
highlighter-rouge">@Result(type = "forward")</code>.</p>
+
<h2 id="xwork-packages">XWork packages</h2>
<p>Actions are placed on a custom XWork package which prevents conflicts. The
name of this package is based on the Java