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 4b10c9a53 Updates stage by Jenkins 4b10c9a53 is described below commit 4b10c9a53d990fbd4e573b85d2f04b263e9f2b7a Author: jenkins <bui...@apache.org> AuthorDate: Sat Oct 28 15:26:28 2023 +0000 Updates stage by Jenkins --- content/tag-developers/include-tag.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/content/tag-developers/include-tag.html b/content/tag-developers/include-tag.html index b93c3120b..e053ddd60 100644 --- a/content/tag-developers/include-tag.html +++ b/content/tag-developers/include-tag.html @@ -163,11 +163,20 @@ through the <code class="language-plaintext highlighter-rouge"><s:property... via the HttpServletRequest object or from a JSP page via a scriptlet.</p> </blockquote> -<p><strong>How To access parameters</strong></p> +<h3 id="how-to-access-parameters">How to access parameters</h3> <p>Parameters are passed as request parameters, so use the <code class="language-plaintext highlighter-rouge">${param.ParamName}</code> notation to access them. Do not use the <strong>property</strong> tag to access parameters in included files.</p> +<p>Below it’s an example how you can access parameters passed into the included page:</p> + +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><s:set var="paramName" scope="page">${param.ParamName}</s:set> +</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 in Struts tags.</p> +</blockquote> + <h2 id="attributes">Attributes</h2> <table class="tag-reference"> @@ -220,7 +229,7 @@ the <strong>property</strong> tag to access parameters in included files.</p> <span class="nt"></s:include></span> </code></pre></div></div> -<p>do an include to myJsp.jsp page with parameters <code class="language-plaintext highlighter-rouge">param1=value1</code> and <code class="language-plaintext highlighter-rouge">param2=value2</code></p> +<p>do an include to <code class="language-plaintext highlighter-rouge">myJsp.jsp</code> page with parameters <code class="language-plaintext highlighter-rouge">param1=value1</code> and <code class="language-plaintext highlighter-rouge">param2=value2</code></p> <p><strong>Example 3</strong></p> @@ -230,7 +239,7 @@ the <strong>property</strong> tag to access parameters in included files.</p> <span class="nt"></s:include></span> </code></pre></div></div> -<p>do an include to myJsp.jsp page with parameters <code class="language-plaintext highlighter-rouge">param1=value1</code> and <code class="language-plaintext highlighter-rouge">param2=value2</code></p> +<p>do an include to <code class="language-plaintext highlighter-rouge">myJsp.jsp</code> page with parameters <code class="language-plaintext highlighter-rouge">param1=value1</code> and <code class="language-plaintext highlighter-rouge">param2=value2</code></p> </section> </article>