Details
Description
The ResourceDispatcher is invoked outside of JSF lifecycle but we should avoid working with the FacesContext since this is not a JSF request. Instead, we should make the HttpServletRequest, HttpServletResponse, and ServletContext available to the application code.
I do not see how making HttpServletRequest and HttpServletResponse available to the ice:outputResource user solve the problem in this case.
The simplest solution would be to push an update, this way a new FacesContext will be created without the messages put in the previous one. The update will thus clear the messages rendered previously.