java - how to format number for positive value or absolute value in jstl? -


this question has answer here:

how display positive value or absolute value of number in jstl?

<fmt:formatnumber value="${-85}" format="%" /> <!-- should convert -85 85 --> 

you can use el:

${value < 0 ? -value:value} 

or create custom el function delegates math#abs(int).


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -