JSP JSTL < FMT: Message > tag: reading local messages
•
Java
Grammar 1
Grammar 2
subtags
Example
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <fmt:bundle basename="localMessage">//读取键值 <fmt:message key="company"/> <fmt:message key="author"/> <fmt:message key="branch"/> </fmt:bundle>
Grammar 3
key optional
subtags
Example
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <fmt:bundle basename="localMessage"> <fmt:message key="company" var="company"/> <fmt:message key="author" var="author"/> <fmt:message key="branch" var="branch"/> 公司:${company} 作者:${author} 部门:${branch} </fmt:bundle>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码