ServletContext获取多个servlet公共参数
web.xml:
<context-param> <param-name>context-param</param-name> <param-value>context-value</param-value> </context-param>
获取方式:
ServletContext servletContext = this.getServletContext(); servletContext.getAttribute("name"); System.out.println(servletContext.getAttribute("name"));
人要耐得住寂寞,才能守得住繁华。人生最痛苦的就是拿不起放不下,不属于自己的快乐,及时放手也许是一种解脱,生活中没有谁对谁错,只有适不适合。当发现很多已经改变,更要面对的是事实。