JSP JSTL < FMT: setbundle > tag: Specifies the message resource

Example

<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  <fmt:setBundle basename="localMessage" scope="page"/>//获取指定的键值
  <fmt:message key="company" var="company"/>
  <fmt:message key="author" var="author"/>
  <fmt:message key="branch" var="branch"/>
    公司:${company}
    作者:${author}
    部门:${branch}
company=C语言中文网
author=zs 
branch=Java Web
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
分享
二维码
< <上一篇
下一篇>>