I set the request attribute in a managed bean before redirecting the request through faces-config as follows:
FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("foo","bar");
return "redirect_success";
After that, I try to access this request attribute in my filter by first creating FacesContext
FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("foo");
Finally, you cannot get this attribute in the filter itself, but I can get the same attribute again in the second managed bean very easily. Is there any way to get it in the filter itself?
source
share