0

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.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Kiva
  • 9,193
  • 17
  • 62
  • 94

1 Answers1

2

I found it:

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

Easy when you know ^^

Kiva
  • 9,193
  • 17
  • 62
  • 94