zoukankan      html  css  js  c++  java
  • <fmt:setBundle/>标签

    <%@ page language="java" contentType="text/html; charset=UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    </head>
    <body>

    <!-- fmt:setLocale value="en"/ -->
    <!-- setBundle标签把资源映射到var指定的变量中去,供message标签的bundle属性使用。 -->
    <fmt:setBundle basename="messages" var="resource" scope="request"/>

    <!-- bundle属性用于声明被绑定的资源,不能为字符串。bundle属性与setBundle标签一起使用 -->
    <fmt:message bundle="${ resource }" key="prompt.hello">
    <fmt:param>Helloween</fmt:param>
    </fmt:message> <br/>

    <fmt:message bundle="${ resource }" key="prompt.greeting"></fmt:message>

    </body>
    </html>

  • 相关阅读:
    S MVC 转发与重定向
    S MVC Controller方法返回值
    S MVC 表单提交
    numpy数据平滑
    Python入门
    Django
    python机器学习基础教程-监督学习
    drf-CBV
    numpy数组符号化与函数向量化
    numpy中多项式拟合与复数
  • 原文地址:https://www.cnblogs.com/Nickzerui/p/4546816.html
Copyright © 2011-2022 走看看