문제

I want to get a context-param configure in my web.xml. In a method call normally (with seam 2.2.0), I do this:

readDirectory = (String) FacesContext.getCurrentInstance()
                .getExternalContext().getInitParameter(
                        "ReadDirectory");

It's work fine, but in asynchronous method (@Asynchronous) my faceContext is null.

So I don't know how to get this param.

도움이 되었습니까?

해결책

I found it:

ServletLifecycle.getServletContext().getInitParameter("ReadDirectory");

Easy when you know ^^

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top