日期:2014-05-20  浏览次数:20725 次

jsf 怎么取得 web.xml 上的 context > param 的value值。好象我要表达的意思应该是 jsf 怎么取的一个 servletContextEvent 吧。
不知道朋友能理解我的意思么。谢谢。

------解决方案--------------------
(ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext();
返回的就是ServletContext

FacesContext位于javax.faces.context.FacesContext;