jsp application获取全局变量

来源:互联网 发布:电子琴midi软件 编辑:程序博客网 时间:2024/05/29 14:50

jsp中如何获取web.xml中定义的全局变量的值,

webx.xml定义全局变量

    <context-param>        <param-name>staticrespath</param-name>        <param-value>http://localhost:8080</param-value>    </context-param>

jsp中使用全局变量
String basePath = application.getInitParameter(“staticrespath”);

0 0
原创粉丝点击