writeResponse(httpServletResponse, value);
} catch( TemplateException ex ) {
ScriptRuntime runtime = templates.load( "templates/exception.jst" );
runtime.addGlobalVariable( "request", httpServletRequest);
runtime.addGlobalVariable( "response", httpServletResponse );
runtime.addGlobalVariable( "servletContext", getServletContext() );
runtime.addVariable("ex", ex );
writeResponse( httpServletResponse, runtime.invoke() );
}