我想在我的web.xml中配置一个上下文参数。在正常的方法调用中(使用seam 2.2.0),我这样做:
readDirectory = (String) FacesContext.getCurrentInstance()
.getExternalContext().getInitParameter(
"ReadDirectory");它工作得很好,但是在异步方法(@ asynchronous )中,我的faceContext为空。
所以我不知道如何得到这个参数。
发布于 2010-09-10 17:43:19
我找到了:
ServletLifecycle.getServletContext().getInitParameter("ReadDirectory");当你知道的时候很容易^^
https://stackoverflow.com/questions/3683245
复制相似问题