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 427b90e821 Updates stage by Jenkins
427b90e821 is described below
commit 427b90e8212c9eca986a090e6c68f988484db257
Author: jenkins <[email protected]>
AuthorDate: Mon Oct 12 18:54:23 2026 +0000
Updates stage by Jenkins
---
content/core-developers/package-configuration.html | 15 +++++++++++----
content/getting-started/themes.html | 1 +
content/tag-developers/selecting-template-directory.html | 4 ++++
content/tag-developers/selecting-themes.html | 4 ++++
content/tag-developers/template-loading.html | 3 ++-
5 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/content/core-developers/package-configuration.html
b/content/core-developers/package-configuration.html
index 4df40a72ae..7aab9f8de1 100644
--- a/content/core-developers/package-configuration.html
+++ b/content/core-developers/package-configuration.html
@@ -274,7 +274,7 @@ They only get overrides from their parent package, set with
<code class="languag
"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">"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">"x"</span><span class="nt">/></span>
+ <span class="nt"><scoped-constant</span> <span
class="na">name=</span><span class="s">"struts.ui.theme"</span> <span
class="na">value=</span><span class="s">"css_xhtml"</span><span
class="nt">/></span>
...
<span class="nt"></package></span>
<span class="nt"></struts></span>
@@ -307,8 +307,15 @@ framework components once, at startup, so a package value
only takes effect wher
it per request. Such a component declares the constants it reads as
<em>scopable</em>, and only those can appear
in <code class="language-plaintext
highlighter-rouge"><scoped-constant></code>.</p>
-<p class="alert alert-warning">Struts core does not declare any constant as
scopable yet. A <code class="language-plaintext
highlighter-rouge"><scoped-constant></code> only works with a constant
-declared scopable by a plugin or by your own application code.</p>
+<p>Since Struts 7.5.0 these core constants are scopable:</p>
+
+<ul>
+ <li><code class="language-plaintext
highlighter-rouge">struts.ui.theme</code>, the default theme of UI tags, see <a
href="../tag-developers/selecting-themes">Selecting Themes</a></li>
+ <li><code class="language-plaintext
highlighter-rouge">struts.ui.templateDir</code>, the default template directory
of UI tags, see
+<a href="../tag-developers/selecting-template-directory">Selecting Template
Directory</a></li>
+</ul>
+
+<p>Plugins and your own application code can declare more, see <a
href="#making-a-constant-scopable">Making a constant scopable</a>.</p>
<p>The configuration is validated at startup, and loading fails when:</p>
@@ -323,7 +330,7 @@ System properties and environment variables are resolved
once, when the configur
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"><scoped-constant</span> <span
class="na">name=</span><span class="s">"struts.ui.theme"</span> <span
class="na">value=</span><span
class="s">"${env.ADMIN_THEME:css_xhtml}"</span><span class="nt">/></span>
...
<span class="nt"></package></span>
</code></pre></div></div>
diff --git a/content/getting-started/themes.html
b/content/getting-started/themes.html
index d006016029..4df4a0ef35 100644
--- a/content/getting-started/themes.html
+++ b/content/getting-started/themes.html
@@ -222,6 +222,7 @@ Struts should use:</p>
<li>The request-scoped attribute named <code class="language-plaintext
highlighter-rouge">theme</code></li>
<li>The session-scoped attribute named <code class="language-plaintext
highlighter-rouge">theme</code></li>
<li>The application-scoped attribute named <code class="language-plaintext
highlighter-rouge">theme</code></li>
+ <li>The <code class="language-plaintext
highlighter-rouge">struts.ui.theme</code> scoped constant of the action’s
package (since 7.5.0)</li>
<li>The <code class="language-plaintext
highlighter-rouge">struts.ui.theme</code> constant in <code
class="language-plaintext highlighter-rouge">struts.xml</code> (defaults to
<code class="language-plaintext highlighter-rouge">xhtml</code>)</li>
</ol>
diff --git a/content/tag-developers/selecting-template-directory.html
b/content/tag-developers/selecting-template-directory.html
index 7799ad6ace..799a5b63b6 100644
--- a/content/tag-developers/selecting-template-directory.html
+++ b/content/tag-developers/selecting-template-directory.html
@@ -160,6 +160,8 @@
<li>The request-scoped attribute named <code class="language-plaintext
highlighter-rouge">templateDir</code></li>
<li>The session-scoped attribute named <code class="language-plaintext
highlighter-rouge">templateDir</code></li>
<li>The application-scoped attribute named <code class="language-plaintext
highlighter-rouge">templateDir</code></li>
+ <li>The <code class="language-plaintext
highlighter-rouge">struts.ui.templateDir</code> <a
href="../core-developers/package-configuration#scoped-constants">scoped
constant</a> of the
+action’s package or one of its parents (since 7.5.0)</li>
<li>The <code class="language-plaintext
highlighter-rouge">struts.ui.templateDir</code> property in <code
class="language-plaintext highlighter-rouge">struts.xml</code> (defaults to
<em>template</em>)</li>
</ol>
@@ -167,6 +169,8 @@
<ul>
<li>To change the template directory for the entire application, modify the
<code class="language-plaintext highlighter-rouge">struts.xml</code></li>
+ <li>To change the template directory for all actions of a package, declare
+<code class="language-plaintext highlighter-rouge"><scoped-constant
name="struts.ui.templateDir" value="admin-template"/></code> in that package
(since 7.5.0)</li>
</ul>
</section>
diff --git a/content/tag-developers/selecting-themes.html
b/content/tag-developers/selecting-themes.html
index ff71dc5e43..b039365997 100644
--- a/content/tag-developers/selecting-themes.html
+++ b/content/tag-developers/selecting-themes.html
@@ -161,6 +161,8 @@
<li>The request-scoped attribute named <code class="language-plaintext
highlighter-rouge">theme</code></li>
<li>The session-scoped attribute named <code class="language-plaintext
highlighter-rouge">theme</code></li>
<li>The application-scoped attribute named <code class="language-plaintext
highlighter-rouge">theme</code></li>
+ <li>The <code class="language-plaintext
highlighter-rouge">struts.ui.theme</code> <a
href="../core-developers/package-configuration#scoped-constants">scoped
constant</a> of the action’s
+package or one of its parents (since 7.5.0)</li>
<li>The <code class="language-plaintext
highlighter-rouge">struts.ui.theme</code> property in <code
class="language-plaintext highlighter-rouge">struts.xml</code> (defaults to
<em>xhtml</em>)</li>
</ol>
@@ -172,6 +174,8 @@
<li>To override an entire form’s theme, change the “theme” attribute of the
form. (Convenient for using
the <a href="ajax-theme">ajax theme</a> for specific forms, for example.)</li>
<li>To support user-selected themes, set the theme in the user’s
session.</li>
+ <li>To change the theme for all actions of a package, declare
+<code class="language-plaintext highlighter-rouge"><scoped-constant
name="struts.ui.theme" value="css_xhtml"/></code> in that package (since
7.5.0).</li>
<li>To change the theme for the entire application, modify the <code
class="language-plaintext highlighter-rouge">struts.xml</code>.</li>
</ul>
diff --git a/content/tag-developers/template-loading.html
b/content/tag-developers/template-loading.html
index b3b7ef463e..929d6487b8 100644
--- a/content/tag-developers/template-loading.html
+++ b/content/tag-developers/template-loading.html
@@ -172,7 +172,8 @@ use. Internally, the JSP, FTL, Velocity tags are all
rendered using FreeMarker.<
<h2 id="template-and-themes">Template and Themes</h2>
<p>Templates are loaded based the template directory and theme name (see <a
href="selecting-themes">Selecting Themes</a>).
-The template directory is defined by the <code class="language-plaintext
highlighter-rouge">struts.ui.templateDir</code> property in <code
class="language-plaintext highlighter-rouge">struts.xml</code> (defaults to
<code class="language-plaintext highlighter-rouge">template</code>).
+The template directory is defined by the <code class="language-plaintext
highlighter-rouge">struts.ui.templateDir</code> property in <code
class="language-plaintext highlighter-rouge">struts.xml</code> (defaults to
<code class="language-plaintext highlighter-rouge">template</code>),
+and can be overridden per package or per tag (see <a
href="selecting-template-directory">Selecting Template Directory</a>).
If a tag is using the <code class="language-plaintext
highlighter-rouge">xhtml</code> theme, the following two locations will be
searched (in this order):</p>
<table>