private RequestToComponentResolver resolver = new QualifiedClassNameResolver();
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
HtmlCanvas html = HtmlCanvasFactory.createCanvas(request, response, response.getWriter());
Renderable component = resolver.renderComponentForRequest(request);
if (component == null) {
component = new MissingComponentError(resolver);
}
try {
html.render(component);
} catch (RenderException rex) {
LOG.log(Level.SEVERE,"[renderSnake render failure]",rex);
html.render(rex);
} catch (Exception ex) {
LOG.log(Level.SEVERE,"[renderSnake render failure]",ex);
html.render(RenderException.caught(ex));
}
}