@Path("index.gtmpl")
Template index;
@View
public Response.Content index() {
Stream printer = OutputStream.create(Tools.UTF_8, new Appendable() {
public Appendable append(CharSequence csq) throws IOException {
throw new IOException();
}
public Appendable append(CharSequence csq, int start, int end) throws IOException {
throw new IOException();
}
public Appendable append(char c) throws IOException {
throw new IOException();
}
});
index.renderTo(printer);
final LinkedList<Throwable> errors = new LinkedList<Throwable>();
printer.close(new Thread.UncaughtExceptionHandler() {
public void uncaughtException(Thread t, Throwable e) {
errors.add(e);
}
});
String ret;