private void distinguishTour(SessionRequestContent request) {
        List<Tour> list = (List<Tour>) request.getSessionAttribute(JSP_TOUR_LIST);
        String selectId = request.getParameter(JSP_SELECT_ID);
        Integer idTour = null;
        if (selectId != null) {
            idTour = Integer.decode(selectId);
        } else {
            Tour tour = (Tour) request.getSessionAttribute(JSP_CURRENT_TOUR);
            if (tour != null) {
                idTour = tour.getIdTour();
            }
        }
        if (idTour != null) {
            request.setSessionAttribute(JSP_CURRENT_TOUR, null);
            for (Tour tour: list) {
                if (Objects.equals(tour.getIdTour(), idTour)) {
                    request.setSessionAttribute(JSP_CURRENT_TOUR, tour);

                    SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
                    Date d1 = tour.getDepartDate();
                    String ds1 = formatter.format(d1);  
                    request.setAttribute(JSP_CURR_DEPART_DATE, ds1);

                    Integer dn = tour.getDaysCount();
                    Calendar c = Calendar.getInstance(); 
                    c.setTime(d1); 
                    c.add(Calendar.DATE, dn);
                    Date d2 = c.getTime();
                    String ds2 = formatter.format(d2);
                    request.setAttribute(JSP_CURR_ARRIVAL_DATE, ds2);
                }
            }
        }
    }