src/main/java/org/openimmunizationsoftware/pt/servlet/ProjectTodoServlet.java
@SuppressWarnings("unchecked")
  protected void processRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    AppReq appReq = new AppReq(request, response);
    try {
      WebUser webUser = appReq.getWebUser();
      if (appReq.isLoggedOut()) {
        forwardToHome(request, response);
        return;
      }
      Session dataSession = appReq.getDataSession();
      String action = appReq.getAction();
      PrintWriter out = appReq.getOut();
      SimpleDateFormat sdf = webUser.getDateFormat();

      int actionId = Integer.parseInt(request.getParameter(PARAM_ACTION_ID));

      ProjectAction projectAction = (ProjectAction) dataSession.get(ProjectAction.class, actionId);


      Project project = projectAction.getProject();

      List<Project> projectSelectedList = setupProjectList(appReq, project);

      TimeTracker timeTracker = appReq.getTimeTracker();



      ProjectContactAssigned projectContactAssignedForThisUser =
          getProjectContactAssigned(webUser, dataSession, project);

      if (action != null) {
      }

      appReq.setTitle("Projects");
      printHtmlHead(appReq);
      
      if (false) {

      out.println(
          "<form name=\"projectAction\" method=\"post\" action=\"ProjectTodoServlet\" id=\"saveProjectActionForm\">");
      out.println("<input type=\"hidden\" name=\"" + PARAM_ACTION_ID + "\" value=\""
          + projectAction.getActionId() + "\">");
      {

        ProjectContact projectContact =
            (ProjectContact) dataSession.get(ProjectContact.class, projectAction.getContactId());
        projectAction.setContact(projectContact);
        ProjectContact nextProjectContact = null;
        if (projectAction.getNextContactId() != null && projectAction.getNextContactId() > 0) {
          nextProjectContact = (ProjectContact) dataSession.get(ProjectContact.class,
              projectAction.getNextContactId());
          projectAction.setNextProjectContact(nextProjectContact);
        }
        out.println("<h2>" + projectAction.getNextDescriptionForDisplay(webUser.getProjectContact())
            + "</h2>");

      }

      out.println("      <input type=\"submit\" name=\"action\" value=\"Save\">");
      out.println("</form>");
      }
      else {
        out.println("Hello!");
      }

      printHtmlFoot(appReq);

    } finally {
      appReq.close();
    }
  }
/**
   * 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
   */
Processes requests for both HTTP GET and POST 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
Processes requests for both HTTP GET and POST 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
@SuppressWarnings("unchecked")
  protected void processRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    AppReq appReq = new AppReq(request, response);
    try {
      WebUser webUser = appReq.getWebUser();
      if (appReq.isLoggedOut()) {
        forwardToHome(request, response);
        return;
      }
      Session dataSession = appReq.getDataSession();
      String action = appReq.getAction();
      PrintWriter out = appReq.getOut();
      SimpleDateFormat sdf = webUser.getDateFormat();
      int actionId = Integer.parseInt(request.getParameter(PARAM_ACTION_ID));
      ProjectAction projectAction = (ProjectAction) dataSession.get(ProjectAction.class, actionId);
      Project project = projectAction.getProject();
      List<Project> projectSelectedList = setupProjectList(appReq, project);
      TimeTracker timeTracker = appReq.getTimeTracker();
      ProjectContactAssigned projectContactAssignedForThisUser =
          getProjectContactAssigned(webUser, dataSession, project);
      if (action != null) {
      }
      appReq.setTitle("Projects");
      printHtmlHead(appReq);
      if (false) {
      out.println(
          "<form name=\"projectAction\" method=\"post\" action=\"ProjectTodoServlet\" id=\"saveProjectActionForm\">");
      out.println("<input type=\"hidden\" name=\"" + PARAM_ACTION_ID + "\" value=\""
          + projectAction.getActionId() + "\">");
      {
        ProjectContact projectContact =
            (ProjectContact) dataSession.get(ProjectContact.class, projectAction.getContactId());
        projectAction.setContact(projectContact);
        ProjectContact nextProjectContact = null;
        if (projectAction.getNextContactId() != null && projectAction.getNextContactId() > 0) {
          nextProjectContact = (ProjectContact) dataSession.get(ProjectContact.class,
              projectAction.getNextContactId());
          projectAction.setNextProjectContact(nextProjectContact);
        }
        out.println("<h2>" + projectAction.getNextDescriptionForDisplay(webUser.getProjectContact())
            + "</h2>");
      }
      out.println("      <input type=\"submit\" name=\"action\" value=\"Save\">");
      out.println("</form>");
      }
      else {
        out.println("Hello!");
      }
      printHtmlFoot(appReq);
    } finally {
      appReq.close();
    }
  }
@ SuppressWarnings ( "unchecked" ) protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { AppReq appReq = new AppReq ( request , response ) ; try { WebUser webUser = appReq . getWebUser ( ) ; if ( appReq . isLoggedOut ( ) ) { forwardToHome ( request , response ) ; return ; } Session dataSession = appReq . getDataSession ( ) ; String action = appReq . getAction ( ) ; PrintWriter out = appReq . getOut ( ) ; SimpleDateFormat sdf = webUser . getDateFormat ( ) ; int actionId = Integer . parseInt ( request . getParameter ( PARAM_ACTION_ID ) ) ; ProjectAction projectAction = ( ProjectAction ) dataSession . get ( ProjectAction . class , actionId ) ; Project project = projectAction . getProject ( ) ; List < Project > projectSelectedList = setupProjectList ( appReq , project ) ; TimeTracker timeTracker = appReq . getTimeTracker ( ) ; ProjectContactAssigned projectContactAssignedForThisUser = getProjectContactAssigned ( webUser , dataSession , project ) ; if ( action != null ) { } appReq . setTitle ( "Projects" ) ; printHtmlHead ( appReq ) ; if ( false ) { out . println ( "<form name=\"projectAction\" method=\"post\" action=\"ProjectTodoServlet\" id=\"saveProjectActionForm\">" ) ; out . println ( "<input type=\"hidden\" name=\"" + PARAM_ACTION_ID + "\" value=\"" + projectAction . getActionId ( ) + "\">" ) ; { ProjectContact projectContact = ( ProjectContact ) dataSession . get ( ProjectContact . class , projectAction . getContactId ( ) ) ; projectAction . setContact ( projectContact ) ; ProjectContact nextProjectContact = null ; if ( projectAction . getNextContactId ( ) != null && projectAction . getNextContactId ( ) > 0 ) { nextProjectContact = ( ProjectContact ) dataSession . get ( ProjectContact . class , projectAction . getNextContactId ( ) ) ; projectAction . setNextProjectContact ( nextProjectContact ) ; } out . println ( "<h2>" + projectAction . getNextDescriptionForDisplay ( webUser . getProjectContact ( ) ) + "</h2>" ) ; } out . println ( "      <input type=\"submit\" name=\"action\" value=\"Save\">" ) ; out . println ( "</form>" ) ; } else { out . println ( "Hello!" ) ; } printHtmlFoot ( appReq ) ; } finally { appReq . close ( ) ; } }
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
Processes requests for both HTTP <code > GET< / code > and <code > POST< / code > methods .