title: SparkJava custom error page
body: <p>Does anyone know how to <strong>override</strong> existing 404 error page when using <strong>Spark</strong> micro web framework ?</p>
  
  <p>The <strong>default</strong> error page is:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/&gt;
  &lt;title&gt;Error 404 &lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h2&gt;HTTP ERROR: 404&lt;/h2&gt;
  &lt;p&gt;Problem accessing /strangepage. Reason:
  &lt;pre&gt;    Not Found&lt;/pre&gt;&lt;/p&gt;
  &lt;hr /&gt;&lt;i&gt;&lt;small&gt;Powered by Jetty://&lt;/small&gt;&lt;/i&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to edit this <strong>custom</strong> error page (or maybe redirect it to a another route) :</p>
  
  <pre><code>get(new Route("/404") {
     @Override
     public Object handle(Request request, Response response) {
         response.type("text/html");
         return "Error page 404";
     }
  });
  </code></pre>