jsp - Negative numbers need to display with paranthnes -


i have bal = -1000.00 want display (1000.00) in jsp.

<c:when test="${((bal) < 0)}"> <(${-1*bal})/> </c:when> 

output id (1000)

decimals discarded.

using:

<fmt:formatnumber type="currency" minfractiondigits="2" value="${bal}" />

will '(1000.00)' when bal -1000.00


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -