Servlet中init-param與context-param的區別

<init-parm>配置在<servlet>標籤中,用來初始化當前的Servlet的,屬於當前Servlet的配置,因此存放在servletConfig對象中;         通過getServletConfig().getInitParameter("initParam")的方式獲取; <context-param>直接配置在web.xml的<web-app>標籤中,屬於上下文參數,在整個w
相關文章
相關標籤/搜索