I would like to format number displayed by <s:property value="summary.total"/>
tag in Struts 2. There is a double
value. How can I do that? Should I use OGNL
?
Or maybe I must use <s:text/>
tag and define my format in resuource file?
I would like to format number displayed by <s:property value="summary.total"/>
tag in Struts 2. There is a double
value. How can I do that? Should I use OGNL
?
Or maybe I must use <s:text/>
tag and define my format in resuource file?
You need to use <s:text/>
with <s:param/>
.
Property file: summary.cost= € {0,number,##0.00}
JSP:
<s:text name="summary.cost" > <s:param name="value" value="summary.total"/> </s:text>
If I understood right what you mean...