I. International TAG Library
1, formatting tags provided by the tag library
2, Label detailed
2.1<fmt:setlocale> Label
The following sets the different areas and displays the dates under the set area
2.2<fmt:requestencoding> Label
2.3 Reading resource Files
First, create a resource file under the Web-inf/classes folder resource.properties
{0} represents a placeholder that can be set dynamically by <fmt:param>
Where Chinese needs to be encoded, you can use the Exlipse tool kit in the self-contained transcoding tool
Then set the name of the resource file to read through <fmt:bundle>
When the <fmt:bundle> tag is set to read the resource file name, you can use the <fmt:message> tag to read the value by key
Read Resource Example
Resource file
Read resources: Notice the difference between <fmt:bundle> and <fmt:setBundle>
JSP page
2.4 Digital formatting Tags <fmt:formatNumber> and digital anti-formatting tags <fmt:parseNumber>
<fmt:formarnumber>, formatting the specified number
<fmt:parsenumber>, to eliminate the format of numbers, as follows
2.5 Date Formatting Tags <fmt:formatDate>
Usage examples
JSP page
2.6<fmt:parsedate> Label
function:<fmt:formatdate> is to change a Date object to a string, and <fmt:parseDate> to convert a string back to the date type data
Property
Use example: To change the previous long and custom date strings back to date data, you need to provide the string's pattern or style type when converting
2.7<fmt:settimezone> Label
Features: Set the displayed time zone and store the set time zone in a domain
Grammar:
<fmt:settimezone value= "time zone (used to set where to display)" >
<!--time display action--
</fmt:setTimeZone>
Three, summary
11.javaweb Internationalization Tag Library