final String message = LocalizationMessages.TEMPLATE_NAME_COULD_NOT_BE_RESOLVED(viewable.getTemplateName());
throw new WebApplicationException(new ProcessingException(message), Response.Status.NOT_FOUND);
}
httpHeaders.putSingle(HttpHeaders.CONTENT_TYPE, resolvedViewable.getMediaType());
resolvedViewable.writeTo(entityStream, httpHeaders);
} catch (ViewableContextException vce) {
throw new NotFoundException(vce);
}
}