jsp获取properties配置文件中的属性值

jsp页面

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
// properties 配置文件名称
ResourceBundle res = ResourceBundle.getBundle("application");
%>


//获取properties配置文件中的属性值
var getDataJsonFreq= <%=res.getString("getDataJsonFreq")%>;
var showAllPointFreq= <%=res.getString("showAllPointFreq")%>;


properties配置文件
##获取实时数据频率(1000=1秒)
getDataJsonFreq = 1000;
##页面刷新频率(1000=1秒)
showAllPointFreq = 1000;
posted @ 2018-01-24 17:57  73tong  阅读(3421)  评论(0编辑  收藏  举报