This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch feature/include-tag-params
in repository https://gitbox.apache.org/repos/asf/struts-site.git

commit 8eafdb67ed218b632a5129e03e7093bb5ee8b9d4
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Sat Oct 28 17:19:19 2023 +0200

    Clarifies how to access parameters in the included page
---
 source/tag-developers/include-tag.md | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/source/tag-developers/include-tag.md 
b/source/tag-developers/include-tag.md
index 514231de3..8d7c9babc 100644
--- a/source/tag-developers/include-tag.md
+++ b/source/tag-developers/include-tag.md
@@ -18,11 +18,19 @@ Please make sure you have read the [Tag Syntax](tag-syntax) 
document and underst
 > through the `<s:property.../>` tag since no ValueStack will be created. You 
 > can, however, access them in a servlet
 > via the HttpServletRequest object or from a JSP page via a scriptlet.
 
-**How To access parameters**
+### How to access parameters
 
 Parameters are passed as request parameters, so use the `${param.ParamName}` 
notation to access them. Do not use 
 the **property** tag to access parameters in included files.
 
+Below it's an example how you can access parameters passed into the included 
page:
+
+```
+<s:set var="paramName" scope="page">${param.ParamName}</s:set>
+```
+
+> **Note**: You can access such params without using JSTL, just use 
`${param.ParamName}` notation in Struts tags.
+
 ## Attributes
 
 {% remote_file_content 
https://raw.githubusercontent.com/apache/struts/master/core/src/site/resources/tags/include-attributes.html
 %}
@@ -46,7 +54,7 @@ do an include myJsp.jsp page
 </s:include>
 ```
 
-do an include to myJsp.jsp page with parameters `param1=value1` and 
`param2=value2`
+do an include to `myJsp.jsp` page with parameters `param1=value1` and 
`param2=value2`
 
 **Example 3**
 
@@ -57,4 +65,4 @@ do an include to myJsp.jsp page with parameters 
`param1=value1` and `param2=valu
 </s:include>
 ```
 
-do an include to myJsp.jsp page with parameters `param1=value1` and 
`param2=value2`
+do an include to `myJsp.jsp` page with parameters `param1=value1` and 
`param2=value2`

Reply via email to