${} is used to indicate that the content is to be evaluated using one
specific language (JSTL EL).
%{} is used to indicate that the content is to be evaluated using
*another* specific language -- in this case OGNL.
(Note, for historical reasons in struts.xml I believe the contents of
both ${} and %{} are evaluated using OGNL -- use %{} in that so as not
to confuse yourself.)
http://struts.apache.org/2.1.6/docs/ognl-basics.html
http://www.opensymphony.com/ognl/html/LanguageGuide/index.html
<s:url action="hello">
<s:param name="name" value="'Struts2'"/>
</s:url>
Do yourself a favor and ALWAYS use %{} where OGNL is expected, so you
don't do something like value="Struts2" expecting it to be the literal
'Struts2' and later find that it tried to evaluate that expression.
value="%{'Struts2'}" is unambiguous: it's an OGNL expression containing
the string "Struts2".
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org