I\'m doing a division in a JSP and I\'d like to round the result - how should I do this?
i.e.
What about this dirty hack:
But I would do this in a bean and just show the result here. Beside this, you can define functions in your tld or, if that is not supported in your environment get functions in the expression language by implementing a Map and (ab)use it. You implement the get(Object) method to do what you want and call it like this:
Note, Helpers provides a "getRound()" method which returns your Map implementation.