Re: NPE with tomahawk t:swapImage

Splash Forums PrettyFaces Users NPE with tomahawk t:swapImage Re: NPE with tomahawk t:swapImage


I modified one of my test projects to reproduce this issue. You can download it here:

The problem seems to be that the MyFaces extension filter calls encodeURL() on the HttpServletResponse that has been wrapped by PrettyFaces. PrettyFacesWrappedResponse tries to obtain the FacesContext which fails because the request hadn’t reached the FacesServlet at this point. Thus the FacesContext is unavailable.

I think we should find some way to remove all references to the FacesContext from PrettyFacesWrappedResponse.