Home » JSTL fmt:message Tag

JSTL fmt:message Tag

by Online Tutorials Library

JSTL Core <fmt:message> Tag

The <fmt:message> tag is used for displaying an internationalized message. It maps the key of localized message to return the value using a resource bundle specified in the bundle attribute.

The syntax used for including the <fmt:message> tag is:

Let’s see the simple example to understand the formatting <fmt:message> tag:

Let us define the default resource bundle Message.java as follows:

Now, compile the above class as Message.class and make it available in CLASSPATH of your Web application folder.

Now you can use the below JSTL tags to display the three vegetables as follows:

Output:

JSTL Formatting Tags8

You may also like