O'Reilly logo

Core JSTL: Mastering the JSP™ Standard Tag Library by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Formatting Actions

Topics in This Chapter

  • Formatting and Parsing Numbers

  • Formatting and Parsing Dates and Times

  • Using Time Zones

  • Determining a Formatting Locale

If you want your website to be accessible to as many people as possible, it's crucial to localize text, as discussed in “I18N Actions” on page 248. But it's just as important to localize numbers, dates, and currencies; for example, if you publicized an event on your website and you specified the date as 06/12/2004, Americans would arrive on June 12th, whereas most Europeans would arrive on December 6th. Fortunately, JSTL provides six actions that you can use to format and parse numbers, currencies, percents, and dates:

  • <fmt:formatNumber>

  • <fmt:parseNumber>

  • <fmt:formatDate>

  • <fmt:parseDate> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required