web.xml 里面的全局参数的配置和在java中的读取

在web.xml中的配置:

<context-param>

           <param-name>name1</param-name>

           <param-value>value1</param-value>
</context-param>

在java中读取

String value = request.getSession().getServletContext().getInitParameter("name1");

猜你喜欢

转载自blog.csdn.net/caim/article/details/6446822
今日推荐