class SpringViewResolverProvider extends AbstractResponseViewProvider {

    public void writeTo(Object o, Class<?> clazz, Type genericType, Annotation[] annotations, MediaType type,
            MultivaluedMap<String, Object> headers, OutputStream os) throws IOException {

        View view = getView(clazz, o);
        String attributeName = getBeanName(o);
        Map<String, Object> model = Collections.singletonMap(attributeName, o);

        try {
            getMessageContext().put(AbstractHTTPDestination.REQUEST_REDIRECTED, Boolean.TRUE);
            logRedirection(view, attributeName, o);
            view.render(model, getMessageContext().getHttpServletRequest(),
                        getMessageContext().getHttpServletResponse());
        } catch (Throwable ex) {
            handleViewRenderingException(view.toString(), ex);
        }
    }

    public  SpringViewResolverProvider(ViewResolver viewResolver, LocaleResolver localeResolver);

}