Re: NPE with tomahawk t:swapImage

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

#20443

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

https://github.com/chkal/prettyfaces-tests/tarball/swapimage

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.

Opinions?