views:

39

answers:

1

Hi guys,

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.

Thanks for your help.

+1  A: 

I found it:

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

Easy when you know ^^

Kiva
Then please accept this answer, otherwise it will be registered as unanswered
Shervin