Currently, the ResourceHandlerImpl sends a 404 on an IOException of a write to response. See lines 292-294 of Mojarra 2.1.3:
In development stage, this will clutter the server logs with JSF1064 warnings whenever the client aborts the resource request by navigating away, or closing browser window, or by pressing Esc while the page is still busy loading.
Those warnings are not exactly the problem, but the normal practice is to delegate such an `IOException` to the servletcontainer and let it handle the problem. Most of them will just ignore it. Sending a 404 makes only sense when the resource is indeed not physically present (i.e. InputStream is null, which is also checked at line 261-264, which is perfectly fine). Sending a 404 makes no sense halfway streaming the resource and/or when the client aborted the connection.
I suggest to remove the catch (IOException) block altogether and let the servletcontainer do the job.