You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andy Sykes <a....@ucl.ac.uk> on 2009/04/16 18:20:15 UTC
and parameters
Hi all,
How can I use parameters passed in to a jsp file with <s:include> in a
Struts2 tag within that JSP?
So for example, I want to include a big chunk of boilerplate HTML and
pass in an image name, then use that passed-in name in an <s:url> tag
to reference it.
Include:
<s:include value="somechunk.jsp">
<s:param name="image">prettything.jpg</s:param>
</s:include>
The docs suggest using ${param.paramname}, which doesn't work -
"According to TLD, value does not accept any expressions".
i.e. <img src="<s:url value="/some/path/to/images/${param.image}"/>">
I feel like I'm missing something incredibly obvious here..
Andy.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org