public class SimpleExample {
public void run(WebServer server) throws IOException {
// Capture internal server errors and display a 500 page
server.add(new Failsafe());
server.start(new Application() {
public void handle(Request request, Response response) throws Exception {
// An unsupported charset will cause an exception, which will cause the FailSafe middleware
// to render a 500 page
Charset encoding = Charset.forName(request.parameter("encoding"));