0 Replies Latest reply on Mar 14, 2011 3:48 PM by emacadie

    Getting NullPointerException in Seam when trying to get ResponseWriter from FacesContext

    emacadie
      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?