struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Yang <kenshin...@gmail.com>
Subject Re: how to format a percentage
Date Wed, 06 May 2009 01:03:07 GMT
have you tried<s:text name="format.percent"><s:param value="%{( (50.0 /
200.0) *100.0)}"/></s:text>

without the decimal OGNL might treat your numbers as integers and there for
you get 0.

I havent test it out but thats what I used to do for JSTL

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message