@Override
  protected void service(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    ApplicationContext applicationContext = ApplicationContext.getInstance();

    try {
      HttpContext httpContext = this.read(req);
      httpContext =
          this.filter.process(
              httpContext, applicationContext.getModel(), applicationContext.getConfiguration());
      this.write(resp, httpContext);

    } catch (FilterException e) {
      this.error(e, resp);
    }
  }