I've intialized a variable in ServletContext
listener using the following code:
sce.getServletContext().setAttribute("foo", "someValue");
So, I can now get the value using following code:
FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get("foo");
Now, I want to access this value in some other class that is not a FacesContext
, or is not a controller. How can I do that?