package error;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

public class ErrorHandler {

  /**
   * Handles error for Java Servlet and displays that something went wrong.
   *
   * @param response    HttpServletResponse
   * @param errorString error message
   * @throws IOException exception thrown when cannot write to file
   */
  public void sendError(HttpServletResponse response, String errorString) throws IOException {
    response.sendError(HttpServletResponse.SC_BAD_REQUEST, errorString);
    response.getWriter().print("<html><head><title>Oops an error happened!</title></head>");
    response.getWriter().print("<body>Something bad happened uh-oh!</body>");
    response.getWriter().println("</html>");
  }

}

@@ -367,16 +367,23 @@
  public 
+static 
 void sen
@@ -439,16 +439,23 @@
 String) 
+%0A      
 throws I
@@ -760,11 +760,10 @@
 %22);%0A  %7D%0A
-%0A
 %7D%0A

Make ErrorHandler sendError() method static