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 <bui...@apache.org>
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">&lt;s:property/&gt;</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>&lt;s:set var="paramName" 
scope="page"&gt;${param.paramName}&lt;/s:set&gt;
 &lt;s:property value="paramName"/&gt;
 </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">&lt;s:set </span><span 
class="na">var=</span><span class="s">"paramName"</span><span 
class="nt">&gt;</span>${param.paramName}<span class="nt">&lt;/s:set&gt;</span>
+<span class="nt">&lt;s:property </span><span class="na">value=</span><span 
class="s">"paramName"</span><span class="nt">/&gt;</span>
+
+<span class="nt">&lt;s:property </span><span class="na">value=</span><span 
class="s">"#attr.paramName"</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;s:property </span><span class="na">value=</span><span 
class="s">"#paramName"</span><span class="nt">/&gt;</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">&lt;s:property/&gt;</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">&lt;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">&gt;</span>${param.param1}<span class="nt">&lt;/s:set&gt;</span>
-Param1 = <span class="nt">&lt;s:property </span><span 
class="na">value=</span><span class="s">"param1"</span><span 
class="nt">/&gt;</span>
-Param2 = ${param.param2}
+<span class="nt">&lt;s:property </span><span class="na">value=</span><span 
class="s">"#attr.param1"</span><span class="nt">/&gt;</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">&lt;s:set </span><span 
class="na">var=</span><span class="s">"param2"</span><span 
class="nt">&gt;</span>${param.param2}<span class="nt">&lt;/s:set&gt;</span>
+<span class="nt">&lt;s:property </span><span class="na">value=</span><span 
class="s">"param2"</span><span class="nt">/&gt;</span>
+
+<span class="nt">&lt;s:property </span><span class="na">value=</span><span 
class="s">"#attr.param2"</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;s:property </span><span class="na">value=</span><span 
class="s">"#param2"</span><span class="nt">/&gt;</span>
+</code></pre></div></div>
 
   </section>
 </article>

Reply via email to