获取web.xml中的context-param和init-param的值

来源:互联网 发布:今晚非农数据显示 编辑:程序博客网 时间:2024/05/03 23:34

web.xml里面可以定义两种参数:

 



在servlet中

第一种参数通过getServletContext().getInitParameter("context/param")得到
第二种参数通过this.getInitParameter("param1")取得


0 0
原创粉丝点击