You want to format a date or a number using the JSTL.
Internationalization or "i18n" is the process by which web developers design their web sites to accommodate visitors who use different languages.
The term "i18n" means internationalization begins with "i," is followed by 18 letters, and ends with "n." It is designed to relieve the tedium of spelling out the word several times.
Localization means adding specific resources to a web site to enable messages such as web page greetings to be translated into the visitor's language. For example, you might localize a site for Japanese visitors by adding resources that contain Japanese translations of text that appears on web pages (I cover more i18n-related Java code in Chapter 24). Example 23-6 uses the JSTL formatting tag library to display the current date and a large number in Swiss and U.S. styles.
Example 23-6. showing a date and a number for U.S. and Swiss audiences
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%--include this taglib for i18n related actions --%> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <html> <head><title>Formatting numbers and dates</title></head> <body> <h2>Dates and numbers in Swiss and US style formats</h2> <%-- create an object representing the current date --%> <jsp:useBean id="now" class="java.util.Date"/> <%-- set the locale to German language, Swiss country ...