I have the following code:
<s:property value="currentPrice" />
<s:property value="oldPrice" />
<span class="badge">-50%</span>
Now I want to display the percentage in the <span>
tag by the formula:
percentage = (currentPrice - oldPrice) / oldPrice * 100
How can I do that in Struts2 ?