SetLocale não funcionou no site jsp para formatar moeda em alemão
Estou confuso com as bibliotecas de tags jstl:
Eu quero formatar um número para uma moeda com estilo alemão ... mas tudo que eu tentei não funcionou ...
Eu encontrei o seguinte exemplo, mas a saída é a mesma -.-
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core"
prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt"
prefix="fmt" %>
<html>
<head>
<title>format number</title>
</head>
<body>
<c:set var="val" value="40.52" />
<p> Currency in USA
<fmt:setLocale value="en_US"/>
<fmt:formatNumber value="${val}"
type="currency" />
</p>
<p>Currency in Germany
<fmt:setLocale value="de_DE"/>
<fmt:formatNumber value="${val}"
type="currency"/>
</p>
</body>
</html>
E essa é a saída:
Currency in USA $40.52
Currency in Germany $40.52
o que há de errado lá?
Obrigado pela ajuda.