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 48fadf8a08 Updates stage by Jenkins
48fadf8a08 is described below
commit 48fadf8a088df93537e76f69d749185924f4f04f
Author: jenkins <[email protected]>
AuthorDate: Thu Nov 19 09:15:25 2026 +0000
Updates stage by Jenkins
---
content/core-developers/action-configuration.html | 63 ++++++++++++++++++++++
.../action-file-upload-interceptor.html | 3 +-
.../core-developers/configuration-elements.html | 2 +-
content/core-developers/static-content.html | 8 ++-
.../struts-parameter-annotation.html | 5 +-
content/core-developers/type-conversion.html | 7 +++
content/core-developers/velocity-properties.html | 2 +-
content/dtds/struts-7.5.dtd | 3 ++
content/plugins/json/index.html | 4 ++
content/security/index.html | 5 ++
content/tag-developers/css-xhtml-theme.html | 2 +-
content/tag-developers/fielderror-tag.html | 9 ++++
content/tag-developers/simple-theme.html | 2 +-
13 files changed, 108 insertions(+), 7 deletions(-)
diff --git a/content/core-developers/action-configuration.html
b/content/core-developers/action-configuration.html
index eec3be0027..bc7efaae24 100644
--- a/content/core-developers/action-configuration.html
+++ b/content/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/content/core-developers/action-file-upload-interceptor.html
b/content/core-developers/action-file-upload-interceptor.html
index 39b6cc164e..21544410ba 100644
--- a/content/core-developers/action-file-upload-interceptor.html
+++ b/content/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/content/core-developers/configuration-elements.html
b/content/core-developers/configuration-elements.html
index 8122b96b44..59489790d8 100644
--- a/content/core-developers/configuration-elements.html
+++ b/content/core-developers/configuration-elements.html
@@ -198,7 +198,7 @@ including packages, namespaces, includes, actions, results,
interceptors, and ex
<h2 id="error-handling">Error Handling</h2>
<ul>
- <li><a href="exceptio-configuration">Exception Configuration</a></li>
+ <li><a href="exception-configuration">Exception Configuration</a></li>
</ul>
</section>
diff --git a/content/core-developers/static-content.html
b/content/core-developers/static-content.html
index 52b180e0b6..ec33b65fc5 100644
--- a/content/core-developers/static-content.html
+++ b/content/core-developers/static-content.html
@@ -171,7 +171,7 @@
<p>Struts can serve a static content like CSS and JavaScript files using a
predefined path. By default, these resources
are served using <code class="language-plaintext
highlighter-rouge">/static</code> path defined using a constant <code
class="language-plaintext highlighter-rouge">struts.ui.staticContentPath</code>
- see below for more details.</p>
-<p>Please remember to include this path in your filter mapping if you use a
custom mapping, see <a href="web-xml.md">web.xml</a> example config.</p>
+<p>Please remember to include this path in your filter mapping if you use a
custom mapping, see <a href="web-xml">web.xml</a> example config.</p>
<h2 id="disabling-static-content">Disabling static content</h2>
@@ -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/content/core-developers/struts-parameter-annotation.html
b/content/core-developers/struts-parameter-annotation.html
index fe0a3de5d2..da8cef9647 100644
--- a/content/core-developers/struts-parameter-annotation.html
+++ b/content/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/content/core-developers/type-conversion.html
b/content/core-developers/type-conversion.html
index dc1b527de4..4168fdfd74 100644
--- a/content/core-developers/type-conversion.html
+++ b/content/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/content/core-developers/velocity-properties.html
b/content/core-developers/velocity-properties.html
index 9df1a2262f..baa919fd27 100644
--- a/content/core-developers/velocity-properties.html
+++ b/content/core-developers/velocity-properties.html
@@ -163,7 +163,7 @@ velocimacro.library = action-default.vm, tigris-macros.vm,
myapp.vm
</code></pre></div></div>
<blockquote>
- <p>See <a href="struts-default-vm">struts-default.vm</a> and the <a
href="velocity">Velocity</a> documentation for more information.</p>
+ <p>See <a href="struts-default-vm">struts-default.vm</a> and the <a
href="../plugins/velocity/">Velocity</a> documentation for more information.</p>
</blockquote>
</section>
diff --git a/content/dtds/struts-7.5.dtd b/content/dtds/struts-7.5.dtd
index 307f5f0e0a..4abfe4627d 100644
--- a/content/dtds/struts-7.5.dtd
+++ b/content/dtds/struts-7.5.dtd
@@ -43,6 +43,7 @@
abstract CDATA #IMPLIED
final CDATA #IMPLIED
strict-method-invocation (true|false) "true"
+ extension CDATA #IMPLIED
>
<!ELEMENT scoped-constant EMPTY>
@@ -105,6 +106,8 @@
class CDATA #IMPLIED
method CDATA #IMPLIED
converter CDATA #IMPLIED
+ http-method CDATA #IMPLIED
+ extension CDATA #IMPLIED
>
<!ELEMENT param (#PCDATA)>
diff --git a/content/plugins/json/index.html b/content/plugins/json/index.html
index 67e66cf4ca..071e20e4a5 100644
--- a/content/plugins/json/index.html
+++ b/content/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/content/security/index.html b/content/security/index.html
index 2a5f06cab4..7202499358 100644
--- a/content/security/index.html
+++ b/content/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/content/tag-developers/css-xhtml-theme.html
b/content/tag-developers/css-xhtml-theme.html
index 9f19dabec1..357fe50ff1 100644
--- a/content/tag-developers/css-xhtml-theme.html
+++ b/content/tag-developers/css-xhtml-theme.html
@@ -157,7 +157,7 @@
<p>The <em>css_xhtml theme</em> provides all the basics that the <a
href="simple-theme">simple theme</a> provides and adds several features.</p>
<ul>
- <li>Standard two-column CSS-based layout, using <code
class="language-plaintext highlighter-rouge"><div></code> for the HTML <a
href="struts-tags">Struts Tags</a> (<a href="form-tag.htmk">form</a>,
+ <li>Standard two-column CSS-based layout, using <code
class="language-plaintext highlighter-rouge"><div></code> for the HTML <a
href="struts-tags">Struts Tags</a> (<a href="form-tag">form</a>,
<a href="textfield-tag">textfield</a>, <a href="select-tag">select</a>,
etc)</li>
<li>Labels for each of the HTML <a href="struts-tags">Struts Tags</a>,
placed according to the CSS stylesheet</li>
<li><a href="../core-developers/validation">Validation</a> and error
reporting</li>
diff --git a/content/tag-developers/fielderror-tag.html
b/content/tag-developers/fielderror-tag.html
index 8dd872097e..aad883027e 100644
--- a/content/tag-developers/fielderror-tag.html
+++ b/content/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>
diff --git a/content/tag-developers/simple-theme.html
b/content/tag-developers/simple-theme.html
index 03f4b022ad..ba4b7702dc 100644
--- a/content/tag-developers/simple-theme.html
+++ b/content/tag-developers/simple-theme.html
@@ -166,7 +166,7 @@ themes. (See <a href="extending-themes">Extending
Themes</a> for more.)</p>
reporting, or any other formatting or functionality.</p>
<blockquote>
- <p>Both the <a href="xhtml-theme">xhtml theme</a> and <a
href="css-xhtml-theme.xhtml">css_xhtml theme</a> extend the simple theme. Look
+ <p>Both the <a href="xhtml-theme">xhtml theme</a> and <a
href="css-xhtml-theme">css_xhtml theme</a> extend the simple theme. Look
to them for examples of how to build on the foundation laid by the simple
theme.</p>
</blockquote>