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 c2f135ea6c Updates stage by Jenkins
c2f135ea6c is described below
commit c2f135ea6c8c3764fe06df052c6b7e465c89b6ec
Author: jenkins <[email protected]>
AuthorDate: Mon Oct 12 18:09:09 2026 +0000
Updates stage by Jenkins
---
content/core-developers/constant-configuration.html | 3 ++-
content/core-developers/package-configuration.html | 15 +++++++++++----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/content/core-developers/constant-configuration.html
b/content/core-developers/constant-configuration.html
index cf3cc0c30e..facffb5c02 100644
--- a/content/core-developers/constant-configuration.html
+++ b/content/core-developers/constant-configuration.html
@@ -220,7 +220,8 @@ You can also define a default value if given System
property or ENV variable is
<span class="nt"></struts></span>
</code></pre></div></div>
-<p>Note: substitution is limited to System properties and ENV variables and
works only for <code class="language-plaintext
highlighter-rouge">constant</code>s (as for now).</p>
+<p>Note: substitution is limited to System properties and ENV variables. It
works for <code class="language-plaintext highlighter-rouge">constant</code>s
and, since Struts 7.5.0,
+for <a href="package-configuration#scoped-constants"><code
class="language-plaintext highlighter-rouge">scoped-constant</code>s</a>.</p>
<h2 id="examples">Examples</h2>
diff --git a/content/core-developers/package-configuration.html
b/content/core-developers/package-configuration.html
index a77481d8c4..4df40a72ae 100644
--- a/content/core-developers/package-configuration.html
+++ b/content/core-developers/package-configuration.html
@@ -318,8 +318,15 @@ The error message lists the scopable constants that are
available.</li>
<li>a package declares the same constant more than once.</li>
</ul>
-<p>Values are used as they are. Unlike in <code class="language-plaintext
highlighter-rouge"><constant></code>, <code class="language-plaintext
highlighter-rouge">${...}</code> <a
href="constant-configuration#value-substitution">value substitution</a>
-is not supported.</p>
+<p>Values support the same <code class="language-plaintext
highlighter-rouge">${...}</code> <a
href="constant-configuration#value-substitution">value substitution</a> as
<code class="language-plaintext highlighter-rouge"><constant></code>.
+System properties and environment variables are resolved once, when the
configuration loads, and the resulting
+value is static:</p>
+
+<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">"admin"</span> <span
class="na">extends=</span><span class="s">"struts-default"</span> <span
class="na">namespace=</span><span class="s">"/admin"</span><span
class="nt">></span>
+ <span class="nt"><scoped-constant</span> <span
class="na">name=</span><span class="s">"some.scopable.constant"</span> <span
class="na">value=</span><span class="s">"${env.ADMIN_VALUE:x}"</span><span
class="nt">/></span>
+ ...
+<span class="nt"></package></span>
+</code></pre></div></div>
<h3 id="making-a-constant-scopable">Making a constant scopable</h3>
@@ -378,8 +385,8 @@ use the <a
href="action-mapper#prefixbasedactionmapper">PrefixBasedActionMapper<
meant to protect the whole application.</p>
<p>The default <code class="language-plaintext
highlighter-rouge">ScopedConstantProvider</code> implementation can be replaced
with the <code class="language-plaintext
highlighter-rouge">struts.scopedConstantProvider</code>
-<a href="../plugins/plugins-architecture#extension-points">extension
point</a>. For now this works only from XML or
-properties configuration. Java-based configuration cannot set it yet.</p>
+<a href="../plugins/plugins-architecture#extension-points">extension
point</a>. Java-based configuration sets it with
+<code class="language-plaintext
highlighter-rouge">ConstantConfig.setScopedConstantProvider(...)</code>.</p>
</section>
</article>