if (servletContext == null) {
servletContext = (ServletContext) extContext.getContext();
}
if (Util.isPrefixMapped(Util.getFacesMapping(context))) {
// if an image has been requested of the ViewHandler,
// set responseComplete() to terminate the remainder of
// the lifecycle and return null;
String viewId = viewToRender.getViewId();
String mimeType = servletContext.getMimeType(viewId);
if (mimeType != null && mimeType.startsWith("image")) {
context.responseComplete();
extContext.dispatch(viewId);
return;
}
}