private void processRequestDefault(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    request.setAttribute(QueryBuilder.HTML_TITLE, GlobalProperties.getTitle());

    RequestDispatcher dispatcher =
        getServletContext().getRequestDispatcher("/WEB-INF/jsp/tumormap/tumormap.jsp");
    dispatcher.forward(request, response);
  }
 private void forwardToErrorPage(
     HttpServletRequest request, HttpServletResponse response, String userMessage, XDebug xdebug)
     throws ServletException, IOException {
   request.setAttribute("xdebug_object", xdebug);
   request.setAttribute(QueryBuilder.USER_ERROR_MESSAGE, userMessage);
   RequestDispatcher dispatcher =
       getServletContext().getRequestDispatcher("/WEB-INF/jsp/error.jsp");
   dispatcher.forward(request, response);
 }
  /**
   * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
   *
   * @param request servlet request
   * @param response servlet response
   * @throws ServletException if a servlet-specific error occurs
   * @throws IOException if an I/O error occurs
   */
  protected void processRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    XDebug xdebug = new XDebug(request);
    request.setAttribute(QueryBuilder.XDEBUG_OBJECT, xdebug);

    try {
      if (validate(request)) {
        setGeneticProfiles(request);
      }

      if (request.getAttribute(ERROR) != null) {
        forwardToErrorPage(request, response, (String) request.getAttribute(ERROR), xdebug);
      } else {
        RequestDispatcher dispatcher =
            getServletContext().getRequestDispatcher("/WEB-INF/jsp/dashboard/dashboard.jsp");
        dispatcher.forward(request, response);
      }

    } catch (DaoException e) {
      xdebug.logMsg(this, "Got Database Exception:  " + e.getMessage());
      forwardToErrorPage(
          request, response, "An error occurred while trying to connect to the database.", xdebug);
    }
  }