This is an automated email from the ASF dual-hosted git repository.
git-site-role 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 e0d5df604 Updates stage by Jenkins
e0d5df604 is described below
commit e0d5df6041b2bb05acb9fa62c25fd02035c4e1fa
Author: jenkins <[email protected]>
AuthorDate: Sun Oct 29 09:39:36 2023 +0000
Updates stage by Jenkins
---
content/tag-developers/include-tag.html | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/content/tag-developers/include-tag.html
b/content/tag-developers/include-tag.html
index ebf84c256..0cc60c0e3 100644
--- a/content/tag-developers/include-tag.html
+++ b/content/tag-developers/include-tag.html
@@ -170,10 +170,19 @@ the <code class="language-plaintext
highlighter-rouge"><s:property/></code
<p>Below it’s an example how you can access parameters passed into the
included page:</p>
+<p>with scope:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><s:set var="paramName"
scope="page">${param.paramName}</s:set>
<s:property value="paramName"/>
</code></pre></div></div>
+<p>with no scope:</p>
+<div class="language-jsp highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><s:set </span><span
class="na">var=</span><span class="s">"paramName"</span><span
class="nt">></span>${param.paramName}<span class="nt"></s:set></span>
+<span class="nt"><s:property </span><span class="na">value=</span><span
class="s">"paramName"</span><span class="nt">/></span>
+
+<span class="nt"><s:property </span><span class="na">value=</span><span
class="s">"#attr.paramName"</span><span class="nt">/></span>
+<span class="nt"><s:property </span><span class="na">value=</span><span
class="s">"#paramName"</span><span class="nt">/></span>
+</code></pre></div></div>
+
<blockquote>
<p><strong>Note</strong>: You can access such params without using JSTL,
just use <code class="language-plaintext
highlighter-rouge">${param.paramName}</code> notation.</p>
</blockquote>
@@ -244,12 +253,20 @@ the <code class="language-plaintext
highlighter-rouge"><s:property/></code
<p><strong>Example 4</strong></p>
+<p>accessing passed parameters in the included page</p>
+
+<p>with scope:</p>
<div class="language-jsp highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><s:set </span><span
class="na">var=</span><span class="s">"param1"</span><span class="na">
scope=</span><span class="s">"page"</span><span
class="nt">></span>${param.param1}<span class="nt"></s:set></span>
-Param1 = <span class="nt"><s:property </span><span
class="na">value=</span><span class="s">"param1"</span><span
class="nt">/></span>
-Param2 = ${param.param2}
+<span class="nt"><s:property </span><span class="na">value=</span><span
class="s">"#attr.param1"</span><span class="nt">/></span>
</code></pre></div></div>
-<p>do access passed parameters in the included page</p>
+<p>with no scope:</p>
+<div class="language-jsp highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="nt"><s:set </span><span
class="na">var=</span><span class="s">"param2"</span><span
class="nt">></span>${param.param2}<span class="nt"></s:set></span>
+<span class="nt"><s:property </span><span class="na">value=</span><span
class="s">"param2"</span><span class="nt">/></span>
+
+<span class="nt"><s:property </span><span class="na">value=</span><span
class="s">"#attr.param2"</span><span class="nt">/></span>
+<span class="nt"><s:property </span><span class="na">value=</span><span
class="s">"#param2"</span><span class="nt">/></span>
+</code></pre></div></div>
</section>
</article>