RequestHandler requestHandler = (RequestHandler) context.getAttribute("_REQUEST_HANDLER_");
// see if the type is defined in the controller.xml file
try {
if (Debug.verboseOn()) Debug.logVerbose("Rendering view [" + content + "] of type [" + typeToUse + "]", module);
ViewHandler vh = requestHandler.getViewFactory().getViewHandler(typeToUse);
// use the default content-type and encoding for the ViewHandler -- may want to change this.
vh.render(name, content, info, null, null, request, response);
} catch (ViewHandlerException e) {
throw new ServletException(e.getNonNestedMessage(), e.getNested());
}
}