Jstl Tag Library: JSTL Usage Summary (2) FMT Tag library and FN Tag library

Source: Internet
Author: User
Tags format key resource

Third, FMT Tag library
The function of this tag library is to perform internationalized operation, such as time format, conversion of digital format, region conversion, etc.
1. International Knowledge Supplement
ZH_CN China
en_US USA
FR_FR France
2.<fmt:setlocale>
For the determination of the region, the general structure is as follows:
<fmt:setlocale value= ""/>
Value represents the specified region, such as ZH_CN;
3.<fmt:requestencoding>
Used to set the code, the general structure is as follows:
<fmt:requestencoding value= ""/>
Value is used to specify the encoding, such as GBK;
4.<fmt:setbundle>
Setting up resource files; The general structure is as follows:
<fmt:setbundle basename= "" var= ""/>
BaseName indicates the name of the resource file, does not require a properties suffix, and var represents the attribute name of the resource file;
5.<fmt:message>
Gets the value of a particular key; The general structure is as follows:
<fmt:message key= "var=" "bundle=" "/>
Key is used to specify keys;
var saves value;
Bundle represents a resource file;
6.<fmt:formatnumber>
Used to format numbers; The general structure is as follows:
<fmt:formarnumber value= "var=" "maxintegerdigits=" "maxfractiondigits=" "Groupingus" Ed= ""/>
Value represents the values that need to be formatted;
var saves the formatted value;
Maxintegerdigits is used to specify the number of digits in the integer part;
Maxfractiondigits is used to specify the number of digits of a decimal part;
Groupingused is used to specify whether every 3-bit one "," is split; True or False
7.<fmt:parsenumber>
The general structure of the figure is as follows:
<fmt:parsenumber value= "" var= ""/>
8.<fmt:formatdate>
Format Date; The general structure is as follows:
<fmt:formatdate value = "type=" "pattern=" "var="/> This article link Http://www.cxybl.com/html/wy Zz/javascript_ajax/20121116/33887.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.