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 2bea97bd74 Automatic Site Publish by Buildbot
2bea97bd74 is described below
commit 2bea97bd74214df0597ce014349b3de9c4c3d6da
Author: buildbot <[email protected]>
AuthorDate: Thu Nov 19 09:42:01 2026 +0000
Automatic Site Publish by Buildbot
---
output/core-developers/action-configuration.html | 63 +++
.../action-file-upload-interceptor.html | 3 +-
output/core-developers/index.html | 1 +
output/core-developers/static-content.html | 6 +
output/core-developers/struts-boot.html | 438 +++++++++++++++++++++
.../struts-parameter-annotation.html | 5 +-
output/core-developers/type-conversion.html | 7 +
output/plugins/json/index.html | 4 +
output/security/index.html | 5 +
output/tag-developers/fielderror-tag.html | 9 +
10 files changed, 539 insertions(+), 2 deletions(-)
diff --git a/output/core-developers/action-configuration.html
b/output/core-developers/action-configuration.html
index eec3be0027..bc7efaae24 100644
--- a/output/core-developers/action-configuration.html
+++ b/output/core-developers/action-configuration.html
@@ -168,6 +168,10 @@
<li><a href="#rejected-requests"
id="markdown-toc-rejected-requests">Rejected requests</a></li>
</ul>
</li>
+ <li><a href="#action-extensions" id="markdown-toc-action-extensions">Action
Extensions</a> <ul>
+ <li><a href="#rejected-extensions"
id="markdown-toc-rejected-extensions">Rejected extensions</a></li>
+ </ul>
+ </li>
<li><a href="#actionsupport-default"
id="markdown-toc-actionsupport-default">ActionSupport Default</a></li>
<li><a href="#post-back-default"
id="markdown-toc-post-back-default">Post-Back Default</a></li>
<li><a href="#action-default" id="markdown-toc-action-default">Action
Default</a></li>
@@ -580,6 +584,65 @@ the <a href="httpheader-result">HttpHeader Result</a>:</p>
The result name can be changed with the interceptor’s <code
class="language-plaintext highlighter-rouge">badRequestResultName</code>
parameter, or per action by implementing
<code class="language-plaintext
highlighter-rouge">HttpMethodAware#getBadRequestResultName()</code>.</p>
+<h2 id="action-extensions">Action Extensions</h2>
+
+<blockquote>
+ <p>Since Struts 7.5.0</p>
+</blockquote>
+
+<p>By default every action answers on every extension listed in the global
<code class="language-plaintext
highlighter-rouge">struts.action.extension</code> constant
+(<code class="language-plaintext highlighter-rouge">action,,</code> unless
changed). A package or an action can declare its own list with the <code
class="language-plaintext highlighter-rouge">extension</code> attribute,
+so that e.g. one action is served at <code class="language-plaintext
highlighter-rouge">.html</code> and another one without an extension.</p>
+
+<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.5//EN"
+ "https://struts.apache.org/dtds/struts-7.5.dtd"></span>
+<span class="nt"><struts></span>
+ <span class="nt"><package</span> <span class="na">name=</span><span
class="s">"pages"</span> <span class="na">namespace=</span><span
class="s">"/pages"</span> <span class="na">extends=</span><span
class="s">"struts-default"</span> <span class="na">extension=</span><span
class="s">"html"</span><span class="nt">></span>
+ <span class="nt"><action</span> <span class="na">name=</span><span
class="s">"about"</span> <span class="na">class=</span><span
class="s">"org.example.AboutAction"</span><span class="nt">></span>
+ <span class="nt"><result></span>/about.jsp<span
class="nt"></result></span>
+ <span class="nt"></action></span>
+
+ <span class="nt"><action</span> <span class="na">name=</span><span
class="s">"search"</span> <span class="na">class=</span><span
class="s">"org.example.SearchAction"</span> <span
class="na">extension=</span><span class="s">"html,"</span><span
class="nt">></span>
+ <span class="nt"><result></span>/search.jsp<span
class="nt"></result></span>
+ <span class="nt"></action></span>
+ <span class="nt"></package></span>
+<span class="nt"></struts></span>
+</code></pre></div></div>
+
+<p>The value has the same format as <code class="language-plaintext
highlighter-rouge">struts.action.extension</code>: a comma-separated list where
the first entry is the
+default and an empty entry (<code class="language-plaintext
highlighter-rouge">extension=""</code>, or a trailing comma as in <code
class="language-plaintext highlighter-rouge">html,</code>) means “no
extension”. Above,
+<code class="language-plaintext highlighter-rouge">/pages/about.html</code>
reaches <code class="language-plaintext highlighter-rouge">about</code>, while
<code class="language-plaintext highlighter-rouge">search</code> answers on
both <code class="language-plaintext
highlighter-rouge">/pages/search.html</code> and <code
class="language-plaintext highlighter-rouge">/pages/search</code>.
+An entry must not start with <code class="language-plaintext
highlighter-rouge">.</code> or contain <code class="language-plaintext
highlighter-rouge">/</code> or whitespace, otherwise configuration loading
fails.</p>
+
+<p>The effective list of an action is resolved in this order: the action’s own
attribute, its package, the package’s
+parents, and finally the global <code class="language-plaintext
highlighter-rouge">struts.action.extension</code>. An application that declares
no <code class="language-plaintext highlighter-rouge">extension</code> attribute
+behaves exactly as before. An action without a declaration answers only on the
global extensions, never on one that
+some other package declares; a URL with such an extension that maps to no
declaring action, e.g. a static
+<code class="language-plaintext highlighter-rouge">/index.html</code>, is
still passed to the container.</p>
+
+<p>The declared list also drives URLs the framework generates: <code
class="language-plaintext highlighter-rouge"><s:url></code>, <code
class="language-plaintext highlighter-rouge"><s:a></code>, <code
class="language-plaintext highlighter-rouge"><s:form></code>, the <code
class="language-plaintext highlighter-rouge">redirectAction</code>
+and <code class="language-plaintext highlighter-rouge">postback</code> results
use the current request’s extension when the target action allows it, and the
first entry
+of the target’s list otherwise.</p>
+
+<p>The restriction is enforced by the <code class="language-plaintext
highlighter-rouge">actionExtension</code> interceptor, placed right after <code
class="language-plaintext highlighter-rouge">httpMethod</code> in <code
class="language-plaintext highlighter-rouge">basicStack</code>,
+<code class="language-plaintext highlighter-rouge">defaultStack</code>, <code
class="language-plaintext highlighter-rouge">paramsPrepareParamsStack</code>
and the stacks built on them. It checks only the action the request URL
+mapped to; actions reached through a <code class="language-plaintext
highlighter-rouge">chain</code> result or <code class="language-plaintext
highlighter-rouge"><s:action></code> are not checked. If an action
declares
+<code class="language-plaintext highlighter-rouge">extension</code> but its
interceptors do not include <code class="language-plaintext
highlighter-rouge">actionExtension</code>, a warning is logged at startup and
the
+restriction is not enforced.</p>
+
+<p>The attribute is applied by the <code class="language-plaintext
highlighter-rouge">DefaultActionMapper</code> and its subclasses. Other
mappers, such as the
+<a href="../plugins/rest">REST Plugin</a>’s <code class="language-plaintext
highlighter-rouge">RestActionMapper</code>, ignore it, and a warning is logged
at startup when actions
+declare it.</p>
+
+<p class="alert alert-info">This is URL canonicalisation, not access control.
Do not rely on it to hide an action.</p>
+
+<h3 id="rejected-extensions">Rejected extensions</h3>
+
+<p>When the request’s extension is not in the action’s list, the interceptor
returns the <code class="language-plaintext
highlighter-rouge">bad-extension</code> result if it
+can be resolved, in the same way as <code class="language-plaintext
highlighter-rouge">bad-request</code> <a href="#rejected-requests">above</a>.
Otherwise, it responds with
+<code class="language-plaintext highlighter-rouge">404 Not Found</code>. The
result name can be changed with the interceptor’s <code
class="language-plaintext highlighter-rouge">badExtensionResultName</code>
parameter.</p>
+
<h2 id="actionsupport-default">ActionSupport Default</h2>
<p>If the class attribute in an action mapping is left blank, the <code
class="language-plaintext
highlighter-rouge">com.opensymphony.xwork2.ActionSupport</code> class is used
diff --git a/output/core-developers/action-file-upload-interceptor.html
b/output/core-developers/action-file-upload-interceptor.html
index 39b6cc164e..21544410ba 100644
--- a/output/core-developers/action-file-upload-interceptor.html
+++ b/output/core-developers/action-file-upload-interceptor.html
@@ -193,7 +193,8 @@ current invocation, so the file is rejected (since Struts
7.3.0)</li>
<ul>
<li><code class="language-plaintext highlighter-rouge">maximumSize</code>
(optional) - the maximum size (in bytes) that the interceptor will allow a file
reference to be set
on the action. Note, this is <b>not</b> related to the various properties
found in struts.properties.
-Default to approximately 2MB.</li>
+Default to approximately 2MB. Since Struts 7.5.0 a negative value, e.g. <code
class="language-plaintext highlighter-rouge">-1</code>, disables this check. A
value that
+cannot be converted to a number, such as the literal <code
class="language-plaintext highlighter-rouge">null</code>, makes the interceptor
reject every upload.</li>
<li><code class="language-plaintext highlighter-rouge">allowedTypes</code>
(optional) - a comma separated list of content types (ie: <code
class="language-plaintext highlighter-rouge">text/html</code>) that the
interceptor will allow
a file reference to be set on the action. If none is specified allow all types
to be uploaded.</li>
<li><code class="language-plaintext
highlighter-rouge">allowedExtensions</code> (optional) - a comma separated list
of file extensions (ie: <code class="language-plaintext
highlighter-rouge">.html</code>) that the interceptor will allow
diff --git a/output/core-developers/index.html
b/output/core-developers/index.html
index dc89d39a32..b839dfb68f 100644
--- a/output/core-developers/index.html
+++ b/output/core-developers/index.html
@@ -163,6 +163,7 @@ and <a href="result-configuration">results</a>. Each may be
configured via XML o
<li><a href="dependency-injection">Dependency Injection</a></li>
<li><a href="debugging">Debugging</a></li>
<li><a href="development-mode">Development Mode</a></li>
+ <li><a href="struts-boot">Struts Boot</a> - experimental, run an application
from <code class="language-plaintext highlighter-rouge">main()</code> on an
embedded Tomcat</li>
</ul>
<h2 id="configuration">Configuration</h2>
diff --git a/output/core-developers/static-content.html
b/output/core-developers/static-content.html
index 38582b3e19..ec33b65fc5 100644
--- a/output/core-developers/static-content.html
+++ b/output/core-developers/static-content.html
@@ -186,6 +186,12 @@ CSS & JavaScript files on your own, which can be a
good thing when you want
shipped inside the core jar are extracted to your web application directory or
served in some other way.</p>
</blockquote>
+<p class="alert alert-warning">Since Struts 7.5.0 the <code
class="language-plaintext highlighter-rouge">combobox</code>, <code
class="language-plaintext highlighter-rouge">optiontransferselect</code>, <code
class="language-plaintext highlighter-rouge">inputtransferselect</code> and
<code class="language-plaintext highlighter-rouge">updownselect</code> tags
render no
+inline event handlers or per-tag scripts, so they work under a Content
Security Policy without <code class="language-plaintext
highlighter-rouge">'unsafe-inline'</code>.
+Their markup now depends on the matching static scripts: <code
class="language-plaintext highlighter-rouge">combobox.js</code> (new in 7.5.0),
<code class="language-plaintext
highlighter-rouge">optiontransferselect.js</code>
+and <code class="language-plaintext
highlighter-rouge">inputtransferselect.js</code>. If you serve your own copies
of the static files, update them together with
+the upgrade, and make <code class="language-plaintext
highlighter-rouge">combobox.js</code> available as well.</p>
+
<h2 id="custom-static-content-loaders">Custom Static Content Loaders</h2>
<p>Static content is served by an implementation of <code
class="language-plaintext
highlighter-rouge">org.apache.struts2.dispatcher.StaticContentLoader</code>. To
write your own
diff --git a/output/core-developers/struts-boot.html
b/output/core-developers/struts-boot.html
new file mode 100644
index 0000000000..7172c3c08a
--- /dev/null
+++ b/output/core-developers/struts-boot.html
@@ -0,0 +1,438 @@
+<!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>Struts Boot</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/struts-boot.md"
title="Edit this page on GitHub">Edit on GitHub</a>
+
+ <a href="index.html" title="back to Core Developers Guide"><< back to Core
Developers Guide</a>
+
+ <h1 class="no_toc" id="struts-boot">Struts Boot</h1>
+
+<ul id="markdown-toc">
+ <li><a href="#getting-started" id="markdown-toc-getting-started">Getting
started</a> <ul>
+ <li><a href="#dependency"
id="markdown-toc-dependency">Dependency</a></li>
+ <li><a href="#application"
id="markdown-toc-application">Application</a></li>
+ </ul>
+ </li>
+ <li><a href="#registering-actions"
id="markdown-toc-registering-actions">Registering actions</a></li>
+ <li><a href="#settings" id="markdown-toc-settings">Settings</a></li>
+ <li><a href="#defaults" id="markdown-toc-defaults">Defaults</a></li>
+ <li><a href="#starting-from-tests"
id="markdown-toc-starting-from-tests">Starting from tests</a></li>
+ <li><a href="#packaging" id="markdown-toc-packaging">Packaging</a></li>
+ <li><a href="#logging" id="markdown-toc-logging">Logging</a></li>
+</ul>
+
+<blockquote>
+ <p>Since Struts 7.5.0</p>
+</blockquote>
+
+<p class="alert alert-warning">Struts Boot is experimental: its API and
defaults may change between minor releases.</p>
+
+<p>Struts Boot runs a Struts application from a <code
class="language-plaintext highlighter-rouge">main()</code> method on an
embedded Tomcat. Actions are registered in Java,
+so the application needs no <code class="language-plaintext
highlighter-rouge">web.xml</code> and no <code class="language-plaintext
highlighter-rouge">struts.xml</code>, and it can be packaged as a runnable
jar.</p>
+
+<h2 id="getting-started">Getting started</h2>
+
+<h3 id="dependency">Dependency</h3>
+
+<p>Add the starter at the same version as the rest of Struts. Importing the
<code class="language-plaintext highlighter-rouge">struts2-bom</code> keeps the
versions aligned,
+so the starter needs no version of its own:</p>
+
+<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><dependencyManagement></span>
+ <span class="nt"><dependencies></span>
+ <span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.apache.struts<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>struts2-bom<span
class="nt"></artifactId></span>
+ <span class="nt"><version></span>7.4.0<span
class="nt"></version></span>
+ <span class="nt"><type></span>pom<span
class="nt"></type></span>
+ <span class="nt"><scope></span>import<span
class="nt"></scope></span>
+ <span class="nt"></dependency></span>
+ <span class="nt"></dependencies></span>
+<span class="nt"></dependencyManagement></span>
+
+<span class="nt"><dependencies></span>
+ <span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.apache.struts<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>struts2-boot-starter<span
class="nt"></artifactId></span>
+ <span class="nt"></dependency></span>
+<span class="nt"></dependencies></span>
+</code></pre></div></div>
+
+<p>The starter brings <code class="language-plaintext
highlighter-rouge">struts2-core</code> and the embedded Tomcat.</p>
+
+<h3 id="application">Application</h3>
+
+<p>Implement <code class="language-plaintext
highlighter-rouge">StrutsBootApplication</code>, register the actions and start
it from <code class="language-plaintext highlighter-rouge">main()</code>:</p>
+
+<div class="language-java highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">HelloApp</span> <span
class="kd">implements</span> <span class="nc">StrutsBootApplication</span>
<span class="o">{</span>
+
+ <span class="kd">public</span> <span class="kd">static</span> <span
class="kt">void</span> <span class="nf">main</span><span
class="o">(</span><span class="nc">String</span><span class="o">[]</span> <span
class="n">args</span><span class="o">)</span> <span class="o">{</span>
+ <span class="nc">StrutsBoot</span><span class="o">.</span><span
class="na">run</span><span class="o">(</span><span
class="nc">HelloApp</span><span class="o">.</span><span
class="na">class</span><span class="o">,</span> <span
class="n">args</span><span class="o">);</span>
+ <span class="o">}</span>
+
+ <span class="nd">@Override</span>
+ <span class="kd">public</span> <span class="kt">void</span> <span
class="nf">actions</span><span class="o">(</span><span
class="nc">ActionRegistry</span> <span class="n">actions</span><span
class="o">)</span> <span class="o">{</span>
+ <span class="n">actions</span><span class="o">.</span><span
class="na">action</span><span class="o">(</span><span
class="s">"hello"</span><span class="o">,</span> <span
class="nc">HelloAction</span><span class="o">.</span><span
class="na">class</span><span class="o">).</span><span
class="na">success</span><span class="o">(</span><span
class="s">"hello.ftl"</span><span class="o">);</span>
+ <span class="o">}</span>
+<span class="o">}</span>
+</code></pre></div></div>
+
+<p>The action is an ordinary Struts action:</p>
+
+<div class="language-java highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">HelloAction</span> <span
class="o">{</span>
+
+ <span class="kd">public</span> <span class="nc">String</span> <span
class="nf">execute</span><span class="o">()</span> <span class="o">{</span>
+ <span class="k">return</span> <span class="s">"success"</span><span
class="o">;</span>
+ <span class="o">}</span>
+
+ <span class="kd">public</span> <span class="nc">String</span> <span
class="nf">getMessage</span><span class="o">()</span> <span class="o">{</span>
+ <span class="k">return</span> <span class="s">"Hello from Struts
Boot"</span><span class="o">;</span>
+ <span class="o">}</span>
+<span class="o">}</span>
+</code></pre></div></div>
+
+<p>and the view is a FreeMarker template at <code class="language-plaintext
highlighter-rouge">src/main/resources/templates/hello.ftl</code>:</p>
+
+<div class="language-ftl highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="err"><</span><span
class="no">h1</span><span class="err">><@</span><span
class="no">s</span><span class="na">.property</span><span class="w">
</span>value="message"/></h1><span class="w">
+</span></code></pre></div></div>
+
+<p>Run <code class="language-plaintext highlighter-rouge">main()</code> and
open <code class="language-plaintext
highlighter-rouge">http://localhost:8080/hello.action</code>.</p>
+
+<p>The <code class="language-plaintext
highlighter-rouge">StrutsBootApplication</code> class needs a public
no-argument constructor. <code class="language-plaintext
highlighter-rouge">StrutsBoot.run()</code> blocks until the
+server stops.</p>
+
+<p>A complete example, <code class="language-plaintext
highlighter-rouge">apps/boot-hello</code>, is in the <a
href="https://github.com/apache/struts/tree/main/apps/boot-hello">Struts source
tree</a>.
+It is not deployed to Maven repositories.</p>
+
+<h2 id="registering-actions">Registering actions</h2>
+
+<p><code class="language-plaintext
highlighter-rouge">ActionRegistry#action(name, class)</code> registers an
action in the root namespace, and <code class="language-plaintext
highlighter-rouge">namespace(path, body)</code> groups
+actions under a namespace. Each call returns a definition that is configured
fluently:</p>
+
+<div class="language-java highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nd">@Override</span>
+<span class="kd">public</span> <span class="kt">void</span> <span
class="nf">actions</span><span class="o">(</span><span
class="nc">ActionRegistry</span> <span class="n">actions</span><span
class="o">)</span> <span class="o">{</span>
+ <span class="n">actions</span><span class="o">.</span><span
class="na">action</span><span class="o">(</span><span
class="s">"index"</span><span class="o">,</span> <span
class="nc">IndexAction</span><span class="o">.</span><span
class="na">class</span><span class="o">).</span><span
class="na">success</span><span class="o">(</span><span
class="s">"index.ftl"</span><span class="o">);</span>
+
+ <span class="n">actions</span><span class="o">.</span><span
class="na">namespace</span><span class="o">(</span><span
class="s">"/orders"</span><span class="o">,</span> <span
class="n">orders</span> <span class="o">-></span> <span class="o">{</span>
+ <span class="n">orders</span><span class="o">.</span><span
class="na">action</span><span class="o">(</span><span
class="s">"list"</span><span class="o">,</span> <span
class="nc">OrderListAction</span><span class="o">.</span><span
class="na">class</span><span class="o">)</span>
+ <span class="o">.</span><span
class="na">httpMethods</span><span class="o">(</span><span
class="nc">HttpMethods</span><span class="o">.</span><span
class="na">GET</span><span class="o">)</span>
+ <span class="o">.</span><span class="na">success</span><span
class="o">(</span><span class="s">"orders/list.ftl"</span><span
class="o">);</span>
+
+ <span class="n">orders</span><span class="o">.</span><span
class="na">action</span><span class="o">(</span><span
class="s">"save"</span><span class="o">,</span> <span
class="nc">OrderSaveAction</span><span class="o">.</span><span
class="na">class</span><span class="o">)</span>
+ <span class="o">.</span><span class="na">method</span><span
class="o">(</span><span class="s">"save"</span><span class="o">)</span>
+ <span class="o">.</span><span
class="na">httpMethods</span><span class="o">(</span><span
class="nc">HttpMethods</span><span class="o">.</span><span
class="na">POST</span><span class="o">)</span>
+ <span class="o">.</span><span class="na">result</span><span
class="o">(</span><span class="s">"input"</span><span class="o">,</span> <span
class="s">"orders/edit.ftl"</span><span class="o">)</span>
+ <span class="o">.</span><span
class="na">redirectAction</span><span class="o">(</span><span
class="s">"success"</span><span class="o">,</span> <span
class="s">"list"</span><span class="o">);</span>
+ <span class="o">});</span>
+<span class="o">}</span>
+</code></pre></div></div>
+
+<table>
+ <thead>
+ <tr>
+ <th>Method</th>
+ <th>Meaning</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code class="language-plaintext
highlighter-rouge">method(name)</code></td>
+ <td>Action method to invoke, <code class="language-plaintext
highlighter-rouge">execute</code> by default.</td>
+ </tr>
+ <tr>
+ <td><code class="language-plaintext
highlighter-rouge">success(template)</code></td>
+ <td>Shortcut for <code class="language-plaintext
highlighter-rouge">result("success", template)</code>.</td>
+ </tr>
+ <tr>
+ <td><code class="language-plaintext highlighter-rouge">result(name,
template)</code></td>
+ <td>Renders a FreeMarker template. The path must end with <code
class="language-plaintext highlighter-rouge">.ftl</code>.</td>
+ </tr>
+ <tr>
+ <td><code class="language-plaintext
highlighter-rouge">redirectAction(resultName, action)</code></td>
+ <td>Redirects to another action, like the <a
href="redirect-action-result">Redirect Action Result</a>.</td>
+ </tr>
+ <tr>
+ <td><code class="language-plaintext
highlighter-rouge">httpMethods(methods...)</code></td>
+ <td>Restricts the HTTP methods, like the <a
href="action-configuration#http-methods"><code class="language-plaintext
highlighter-rouge">http-method</code> attribute</a>.</td>
+ </tr>
+ <tr>
+ <td><code class="language-plaintext
highlighter-rouge">interceptors(stack)</code></td>
+ <td>Interceptor stack for this action. Also available on a namespace,
for all its actions.</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>The registry’s packages extend <code class="language-plaintext
highlighter-rouge">struts-default</code>, so actions use the <code
class="language-plaintext highlighter-rouge">defaultStack</code> unless <code
class="language-plaintext highlighter-rouge">interceptors(...)</code> names
+another stack. All the usual framework rules apply, including <a
href="struts-parameter-annotation"><code class="language-plaintext
highlighter-rouge">@StrutsParameter</code></a> on
+the properties a request may set.</p>
+
+<p>A template path is resolved under <code class="language-plaintext
highlighter-rouge">templates/</code> on the classpath, so <code
class="language-plaintext highlighter-rouge">orders/list.ftl</code> is
+<code class="language-plaintext
highlighter-rouge">src/main/resources/templates/orders/list.ftl</code>. Views
are FreeMarker only.</p>
+
+<p>The registry is checked at startup, and the application fails to start
when:</p>
+
+<ul>
+ <li>an action name is empty, contains <code class="language-plaintext
highlighter-rouge">/</code>, or is registered twice in a namespace;</li>
+ <li>a template is missing from the classpath;</li>
+ <li>an action class is not public or has no public no-argument
constructor;</li>
+ <li>an action is registered both in the registry and in a <code
class="language-plaintext highlighter-rouge">struts.xml</code> package with the
same namespace.</li>
+</ul>
+
+<h2 id="settings">Settings</h2>
+
+<p>Settings are read from <code class="language-plaintext
highlighter-rouge">struts.properties</code> on the classpath. A <code
class="language-plaintext highlighter-rouge">--key=value</code> program
argument overrides the file.</p>
+
+<table>
+ <thead>
+ <tr>
+ <th>Key</th>
+ <th>Default</th>
+ <th>Meaning</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code class="language-plaintext
highlighter-rouge">struts.boot.port</code></td>
+ <td><code class="language-plaintext highlighter-rouge">8080</code></td>
+ <td>HTTP port; <code class="language-plaintext
highlighter-rouge">0</code> picks a free port</td>
+ </tr>
+ <tr>
+ <td><code class="language-plaintext
highlighter-rouge">struts.boot.context-path</code></td>
+ <td><code class="language-plaintext highlighter-rouge">""</code></td>
+ <td>Context path the application is served at</td>
+ </tr>
+ <tr>
+ <td><code class="language-plaintext
highlighter-rouge">struts.boot.address</code></td>
+ <td>all interfaces</td>
+ <td>Interface to listen on, e.g. <code class="language-plaintext
highlighter-rouge">127.0.0.1</code></td>
+ </tr>
+ </tbody>
+</table>
+
+<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code>java -jar my-app.jar --struts.boot.port=9090
--struts.boot.address=127.0.0.1
+</code></pre></div></div>
+
+<p>Other Struts <a href="constant-configuration">constants</a> can be set in
the same <code class="language-plaintext
highlighter-rouge">struts.properties</code> file.</p>
+
+<h2 id="defaults">Defaults</h2>
+
+<ul>
+ <li>Tomcat listens on all interfaces, not only on localhost. Set <code
class="language-plaintext highlighter-rouge">struts.boot.address</code> to
restrict it.</li>
+ <li>Only a plain HTTP connector is opened. Terminate TLS in front of the
application, and mark the session cookie
+<code class="language-plaintext highlighter-rouge">Secure</code> there.</li>
+ <li>Sessions are tracked by cookie only, never through a <code
class="language-plaintext highlighter-rouge">;jsessionid=</code> URL parameter,
and the session cookie carries
+<code class="language-plaintext highlighter-rouge">SameSite=Lax</code>.</li>
+ <li>Error pages show the status only, without stack traces or the Tomcat
version.</li>
+ <li>Struts Boot does not turn on <code class="language-plaintext
highlighter-rouge">struts.devMode</code>.</li>
+ <li>Each start uses a fresh temporary base directory that is deleted on
shutdown.</li>
+</ul>
+
+<h2 id="starting-from-tests">Starting from tests</h2>
+
+<p><code class="language-plaintext
highlighter-rouge">StrutsBoot.start()</code> starts the server without blocking
and returns a <code class="language-plaintext
highlighter-rouge">StrutsBootServer</code>, which is <code
class="language-plaintext highlighter-rouge">AutoCloseable</code>.
+Combined with <code class="language-plaintext
highlighter-rouge">--struts.boot.port=0</code> it fits integration tests:</p>
+
+<div class="language-java highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="k">try</span> <span
class="o">(</span><span class="nc">StrutsBootServer</span> <span
class="n">server</span> <span class="o">=</span> <span
class="nc">StrutsBoot</span><span class="o">.</span><span
class="na">start</span><span class="o">(</span><span
class="nc">HelloApp</span><span class="o">.</span><span
class="na">class</span><span class="o">,</span> <span class="s">"--struts.b
[...]
+ <span class="nc">String</span> <span class="n">url</span> <span
class="o">=</span> <span class="n">server</span><span class="o">.</span><span
class="na">baseUrl</span><span class="o">()</span> <span class="o">+</span>
<span class="s">"/hello.action"</span><span class="o">;</span>
+ <span class="c1">// send requests to url</span>
+<span class="o">}</span>
+</code></pre></div></div>
+
+<h2 id="packaging">Packaging</h2>
+
+<p>The <code class="language-plaintext highlighter-rouge">boot-hello</code>
example builds a runnable jar with <code class="language-plaintext
highlighter-rouge">maven-shade-plugin</code>. Every Struts plugin ships its own
+<code class="language-plaintext
highlighter-rouge">META-INF/struts-plugin.xml</code>, and shading keeps only
one file with that name, so with two or more plugins on the
+classpath all but one would be silently lost. If your application uses
plugins, package it differently: a thin jar
+with its dependencies in a <code class="language-plaintext
highlighter-rouge">lib/</code> directory (<code class="language-plaintext
highlighter-rouge">maven-dependency-plugin</code> copies them, <code
class="language-plaintext highlighter-rouge">maven-jar-plugin</code> writes the
+<code class="language-plaintext highlighter-rouge">Class-Path</code> manifest
entry), or a distribution built with <code class="language-plaintext
highlighter-rouge">maven-assembly-plugin</code>.</p>
+
+<h2 id="logging">Logging</h2>
+
+<p>Struts logs through the Log4j 2 API and the starter ships no logging
backend, so warnings and errors from Struts are
+not printed until you add one, for example:</p>
+
+<div class="language-xml highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.apache.logging.log4j<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>log4j-core<span
class="nt"></artifactId></span>
+ <span class="nt"><scope></span>runtime<span
class="nt"></scope></span>
+<span class="nt"></dependency></span>
+</code></pre></div></div>
+
+<p>with a <code class="language-plaintext highlighter-rouge">log4j2.xml</code>
on the classpath, or <code class="language-plaintext
highlighter-rouge">log4j-slf4j2-impl</code> to route to an SLF4J backend.</p>
+
+ </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/struts-parameter-annotation.html
b/output/core-developers/struts-parameter-annotation.html
index fe0a3de5d2..da8cef9647 100644
--- a/output/core-developers/struts-parameter-annotation.html
+++ b/output/core-developers/struts-parameter-annotation.html
@@ -318,7 +318,10 @@ made in this order:</p>
<li>neither declares it — bound, to keep models that resolve properties
through a
custom OGNL accessor (a <code class="language-plaintext
highlighter-rouge">Map</code>-backed model, for instance) working. This says
nothing about the action: it only means introspection found no member of that
-name on either object.</li>
+name on either object. Since Struts 7.5.0, if another object further down the
+value stack would take the parameter — for example the previous action left
+there by a <code class="language-plaintext highlighter-rouge">chain</code>
result — that object is held to the <code class="language-plaintext
highlighter-rouge">@StrutsParameter</code>
+requirement instead.</li>
</ol>
<p>Because the model is checked first, a model property that shadows an action
diff --git a/output/core-developers/type-conversion.html
b/output/core-developers/type-conversion.html
index dc1b527de4..4168fdfd74 100644
--- a/output/core-developers/type-conversion.html
+++ b/output/core-developers/type-conversion.html
@@ -210,6 +210,13 @@ error reporting is used to indicate a problem occurred
while processing the type
<li>BigDecimal and BigInteger</li>
</ul>
+<p>Since Struts 7.5.0 surrounding whitespace is trimmed before a value is
converted to a non-String type, so <code class="language-plaintext
highlighter-rouge">" 42 "</code>
+binds to an <code class="language-plaintext highlighter-rouge">Integer</code>
and <code class="language-plaintext highlighter-rouge">" ACTIVE "</code> to an
enum constant. <code class="language-plaintext highlighter-rouge">String</code>
and <code class="language-plaintext highlighter-rouge">Object</code> targets,
and converters you register
+for a type, still receive the raw value. Arrays and collections are trimmed
per element.</p>
+
+<p>Since Struts 7.5.0 a numeric string longer than 1000 characters is rejected
when converted to a boxed number type,
+<code class="language-plaintext highlighter-rouge">BigInteger</code> or <code
class="language-plaintext highlighter-rouge">BigDecimal</code>, and reported as
the usual conversion error for the field.</p>
+
<h3 id="dates">Dates</h3>
<p>A request value is converted to a date or time property by trying a list of
formats in order and using the first one
diff --git a/output/plugins/json/index.html b/output/plugins/json/index.html
index 67e66cf4ca..071e20e4a5 100644
--- a/output/plugins/json/index.html
+++ b/output/plugins/json/index.html
@@ -629,6 +629,10 @@ made with the parameter “callback”=”exec”:</p>
<p>And that the serialized JSON is <code class="language-plaintext
highlighter-rouge">{name: 'El Zorro'}</code>. Then the output will be: <code
class="language-plaintext highlighter-rouge">exec({name: 'El
Zorro'})</code>.</p>
+<p class="alert alert-info">Since Struts 7.5.0 the callback name must be a
JavaScript identifier, optionally a dotted path such as
+<code class="language-plaintext highlighter-rouge">app.handlers.exec</code>,
of at most 128 characters. Any other value is not used: the response is the
plain JSON without
+a wrapper, and a warning is logged.</p>
+
<h3 id="content-type">Content Type</h3>
<p>Content type will be set to <code class="language-plaintext
highlighter-rouge">application/json-rpc</code> by default if SMD is being used,
or <code class="language-plaintext highlighter-rouge">application/json</code>
otherwise.
diff --git a/output/security/index.html b/output/security/index.html
index 2a5f06cab4..7202499358 100644
--- a/output/security/index.html
+++ b/output/security/index.html
@@ -599,6 +599,11 @@ package name patterns. An exact exemption must exist for
each exclusion match (t
<p>The defaults are defined <a
href="https://github.com/apache/struts/blob/main/core/src/main/resources/struts-excluded-classes.xml">here</a>.</p>
+<p class="alert alert-warning">Since Struts 7.5.0 and 6.13.0 the default
excluded packages also include <code class="language-plaintext
highlighter-rouge">java.beans</code>, <code class="language-plaintext
highlighter-rouge">java.lang.reflect</code> and
+<code class="language-plaintext highlighter-rouge">java.lang.invoke</code>, in
both the regular and the <code class="language-plaintext
highlighter-rouge">devMode</code> lists. An application that needs a class from
one of these
+packages in an expression can re-allow that class with <code
class="language-plaintext
highlighter-rouge">struts.excludedPackageExemptClasses</code>
+(<code class="language-plaintext
highlighter-rouge">struts.devMode.excludedPackageExemptClasses</code> in <code
class="language-plaintext highlighter-rouge">devMode</code>).</p>
+
<p>Any expression or target which does not pass this criteria will be blocked,
and you will see a warning in the logs:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code>[WARNING] Target class [class example.MyBean] or
declaring class of member type [public example.MyBean()] are excluded!
diff --git a/output/tag-developers/fielderror-tag.html
b/output/tag-developers/fielderror-tag.html
index 8dd872097e..aad883027e 100644
--- a/output/tag-developers/fielderror-tag.html
+++ b/output/tag-developers/fielderror-tag.html
@@ -585,6 +585,15 @@ html escaped by default.</p>
<span class="nt"><s:fielderror </span><span
class="na">fieldName=</span><span class="s">"field1"</span> <span
class="nt">/></span>
</code></pre></div></div>
+<p><strong>Example 3</strong>: display field errors whose names match a
regular expression (since Struts 7.5.0)</p>
+
+<div class="language-jsp highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><s:fielderror </span><span
class="na">fieldName=</span><span class="s">"users\[0\]\..*"</span><span
class="na"> regex=</span><span class="s">"true"</span> <span
class="nt">/></span>
+</code></pre></div></div>
+
+<p>With <code class="language-plaintext highlighter-rouge">regex="true"</code>
the <code class="language-plaintext highlighter-rouge">fieldName</code>
attribute and nested <code class="language-plaintext
highlighter-rouge">s:param</code> values are regular expressions matched against
+the whole field error name, here every error of the first row of an iterated
<code class="language-plaintext highlighter-rouge">users</code> list. Each
field error is
+rendered once, even when several patterns match it.</p>
+
</section>
</article>