KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm confused with the jstl tag libs: I want to format a number to a currency with german style ... but everything I tried did not worked ... I found the following example but the output is the same -.- <%@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> And thats the output: Currency in USA $40.52 Currency in Germany $40.52 what goes wrong there ? thanks for your help.
Tags (comma-separated)
Save Edits
Cancel