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>

  • 相关阅读:
    倍数求和
    最大(小)值
    数组扁平化:(多维数组 -> 一维数组)
    任意数求和
    找到重复最多项
    Linux 标准 I/O 库
    Linux文件操作函数
    Linux文件的IO操作 一
    Linux文件系统概述二
    Linux文件系统概述
  • 原文地址:https://www.cnblogs.com/Nickzerui/p/4546816.html
Copyright © 2011-2022 走看看