I am working on a Seam app. I am trying to get the ResponseWriter from the FacesContext, but I get a NullPointerException.
I can get a FacesContext by calling FacesContext context = FacesContext.getCurrentInstance(); But the responseWriter variable is null, so calling ResponseWriter writer = context.getResponseWriter(); gives a NullPointerException.
Why would the ResponseWriter be null? We can get it in plenty of other places in our code.
Is there a way I can set it?