Meu metodo getCapacidade retorna um valor Long
120.034123776
Minha duvida é como eu na JSP recebo esse valor e altero para int?
(obs:sendo correto ou nao, nao interessa, qro saber mesmo como faz jah JSP)
a resposta deveria ser apenas a parte inteira:
120
<table width="99%" border="0" align="right" cellpadding="0" cellspacing="0">
<c:forEach var="drive" items="${componentes.drives}">
<tr>
<td width="25%"><strong><bean:message key="invhw.fabricante"/></strong></td>
<td width="75%"><div align="left"><c:out value="${drive.fabricante}"/></div></td>
</tr>
<tr>
<td width="25%"><strong><bean:message key="invhw.modelo"/></strong></td>
<td width="75%"><div align="left"><c:out value="${drive.modelo}"/></div></td>
</tr>
<tr>
<td width="25%"><strong><bean:message key="invhw.nserie"/></strong></td>
<td width="75%"><div align="left"><c:out value="${drive.serial}"/></div></td>
</tr>
<tr>
<td width="25%"><strong><bean:message key="invhw.tipo"/></strong></td>
<td width="75%"><div align="left"><c:choose> <c:when test="${drive.tipo == 'F'}"><bean:message key="invhw.fixo"/></c:when> <c:when test="${drive.tipo == 'C'}"><bean:message key="invhw.cdrom"/></c:when> <c:when test="${drive.tipo == 'R'}"><bean:message key="invhw.ramdisk"/></c:when> <c:when test="${drive.tipo == 'T'}"><bean:message key="invhw.remote"/></c:when> <c:when test="${drive.tipo == 'B'}"><bean:message key="invhw.removivel"/></c:when> <c:otherwise><bean:message key="invhw.desconhecido"/></c:otherwise> </c:choose></div></td>
</tr>
<tr>
<td width="25%"><strong><bean:message key="invhw.revisao"/></strong></td>
<td width="75%"><div align="left"><c:out value="${drive.revisao}"/></div></td>
</tr>
<tr>
<td width="25%"><strong><bean:message key="invhw.capacidade"/></strong></td>
<td width="75%"><div align="left"><c:out value="${(drive.capacidade)/[telefone removido]}"/><bean:message key="invhw.gb"/></div></td>
</tr>
<tr><td> </td><td> </td></tr>
</c:forEach>
</table>
1) ja sei que nao funciona a taglib fmt, com o metodo integerOnly, pq ele transforma tudo em inteiro "120034123776".
2) ja tentei usar o java mas as variaveis se comportam como escopos diferentes e nao passam o valor de uma para a outra(descrito abaixo):<%long capacidade = 0L; %>
<c:set var="capacidade" value="${drive.capacidade}"/>
<c:out value="${drive.capacidade}"/>
<%=capacidade %>
plzzz Gujeiros! soh preciso uma taglib ou a resposta fiquei a manha toda soh nessa porcaria... rssss
