How do you get the fmt tag JSTL to format negative numbers with ()

advertisements

How can I get the JSTL fmt tag to format negative numbers with ()? For example, if I have -20, it would show (20). Positive numbers would be normal.


I was trying to use pattern to do this, but if you use type="currency" you get the parens

<fmt:formatNumber type="currency" value="${line.volume}" />