include tag (Miscellaneous Tag)
Include tag has one attribute
value: It's type is string and It is mandatory parameter.
It is used to include jsp or page or action or servlet or any other web resource where the app is deployed.
You can dynamically include the value by taking the value from the ValueStack using OGNL expression i.e%{}.
Here you need to use %{nameOfVar} because the value attribute type is string and it will take the whatever value you provide as a string only. So using %{nameOfVar} will get the actual value of the variable and will put that value as a string.
Also you can include value using the <s:param/> tag.
When you write <s:include value="../Hello.jsp"/>
then struts will rewrite ../Hello.jsp as absolute URL based on the current URL of the JSP.
value: It's type is string and It is mandatory parameter.
It is used to include jsp or page or action or servlet or any other web resource where the app is deployed.
You can dynamically include the value by taking the value from the ValueStack using OGNL expression i.e%{}.
Here you need to use %{nameOfVar} because the value attribute type is string and it will take the whatever value you provide as a string only. So using %{nameOfVar} will get the actual value of the variable and will put that value as a string.
Also you can include value using the <s:param/> tag.
When you write <s:include value="../Hello.jsp"/>
then struts will rewrite ../Hello.jsp as absolute URL based on the current URL of the JSP.