title: Issue about jetty errorhandling
body: <p>I come across some issues when setting the error handler to jetty:</p>
  
  <p>I create my own error handler:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class ServerErrorPageErrorHandler extends ErrorPageErrorHandler {
      @Override
      protected void writeErrorPageBody(HttpServletRequest request, Writer writer, int code, String message, boolean showStacks)
              throws IOException {
       String uri= request.getRequestURI();
  
       writeErrorPageMessage(request,writer,code,message,uri);
       if (showStacks)
          writeErrorPageStacks(request,writer);
          writer.write("&lt;hr&gt;&lt;i&gt;&lt;small&gt;Powered by OWN-SERVER://&lt;/small&gt;&lt;/i&gt;&lt;hr/&gt;\n");
      }
  }
  </code></pre>
  
  <p>And set it in the file 'jett-web.xml' which is in the folder '/webapp/WEB-INF/'</p>
  
  <pre><code>&lt;Configure class="org.eclipse.jetty.webapp.WebAppContext"&gt;
  &lt;Set name="contextPath"&gt;/&lt;/Set&gt;
  
  &lt;Set name="errorHandler"&gt;
      &lt;New class="com.mobile.service.handlers.ServerErrorPageErrorHandler"/&gt;
  &lt;/Set&gt;&lt;/Configure&gt;
  </code></pre>
  
  <p>when jetty is started, it said no such method for setErrorHandler for class WebAppContext,(I found setErrorHandler method in the its parent class ErrorHandler, so I think it does mean that)</p>
  
  <p>And then create a file 'error-handler-context.xml' and fill in the file:</p>
  
  <pre><code>&lt;Configure class="org.eclipse.jetty.server.handler.ContextHandler"&gt;
    &lt;Set name="contextPath"&gt;/&lt;/Set&gt;   
    &lt;Set name="errorHandler"&gt;
       &lt;New class="com.mobile.service.handlers.ServerErrorPageErrorHandler"/&gt;
     &lt;/Set&gt; 
  &lt;/Configure&gt;
  </code></pre>
  
  <p>Then jetty is started successfully, but the error handler has not effect.</p>
  
  <p>I just want to change the messages that show in the error pages "Power by jetty" to "Power by OWN SERVER".</p>
  
  <p>And I do not want to create a new error page.</p>
  
  <p>So how to realize it?</p>
  
  <p>And I change the config file like this:</p>
  
  <pre><code>&lt;Configure class="org.eclipse.jetty.webapp.WebAppContext"&gt;
     &lt;Set name="contextPath"&gt;/&lt;/Set&gt;
        &lt;Call name="setErrorHandler"&gt;
          &lt;Arg&gt;
              &lt;New class="com.hp.mobile.service.handlers.ServerErrorPageErrorHandler"/&gt;
         &lt;/Arg&gt;
       &lt;/Call&gt;
  
  &lt;/Configure&gt;
  </code></pre>
  
  <p>After jetty started, it still says NoSuchMethod 'setErrorHanlder' exception,</p>
  
  <p>And I debug it, and get the exception:</p>
  
  <blockquote>
    <p>"java.lang.illegalargumentexception: argument type mismatch"
    at the method.invoke(obj, arg) in "TypeUtil.java“</p>
  </blockquote>
  
  <p>setErrorHandler's argument is the <code>ErrorHandler</code> class,</p>
  
  <p>And in my case, it extends from the <code>ErrorHandler</code>,</p>
  
  <p>So why does it happen?</p>
  
  <p>BTW: I also change the class <code>ServerErrorPageErrorHandler</code> to extend from <code>ErrorHandler</code>, it does not work also.</p>