コード例 #1
0
  protected void processRequest(HttpServletRequest request, HttpServletResponse response)
      throws Exception {
    System.out.println("processRequest " + response + " " + request);
    Candidat c = (Candidat) request.getSession().getAttribute("candidat");

    ArrayList<Inscription> listeInscription;
    // Construire la liste des tests et la placer en session
    try {
      listeInscription = InscriptionStore.rechercherInscription(c.getIdCandidat());
      System.out.println(listeInscription);
      request.setAttribute("inscriptions", listeInscription);
      RequestDispatcher dispatcher = null;
      dispatcher = request.getRequestDispatcher("/CandidatInscriptions.jsp");
      dispatcher.forward(request, response);
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
コード例 #2
0
 /**
  * Désinscrit un candidat.
  *
  * @param candidat
  * @return
  */
 public boolean remove(Candidat candidat) {
   Inscriptions.getConnection().retirerCandidatCompetition(candidat, this);
   candidat.remove(this);
   return candidats.remove(candidat);
 }