摘要: 1、在JSF环境中获取到ServletContext: 1 2 ServletContext sc = (ServletContext)FacesContext. getCurrentInstance().getExternalContext().getContext(); 1 2 ServletC 阅读全文
posted @ 2016-05-31 16:54 TalkHui 阅读(44251) 评论(0) 推荐(2) 编辑
摘要: 这里来说说用Servlet获取URL地址。在HttpServletRequest类里,有以下六个取URL的函数: getContextPath 取得项目名 getServletPath 取得Servlet名 getPathInfo 取得Servlet后的URL名,不包括URL参数 getReques 阅读全文
posted @ 2016-05-31 13:51 TalkHui 阅读(997) 评论(0) 推荐(0) 编辑