How to convert String to Double using JSP FMT EL

0

Hello I have a string 9,9, I would like to convert it to 9.9 and double it to do sum

Currently I use this way:

<c:set var="media" value="0" />
//onde a funcao.valor é uma string 9,9
<c:set var="ontem" value="${ontem + funcao.valor}" />

Thank you in advance

    
asked by anonymous 03.11.2016 / 15:13

1 answer

0

Resolved I used the function: fn: replace

So it looks like this:

<c:set var="media" value="0" />
//onde a funcao.valor é uma string 9,9
<c:set var="ontem" value="${ontem + fn:replace(funcao.valor,',','.')}" />

It worked fine,

    
03.11.2016 / 15:19