/** @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response) */
  protected void service(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    Session s = HibernateUtils.getSession();
    int id;
    String attr = null;
    @SuppressWarnings("rawtypes")
    Enumeration lf = request.getParameterNames();

    while (lf.hasMoreElements()) {
      attr = (String) lf.nextElement();
      if (!("idinv").equals(attr)) {
        id = Integer.parseInt(attr);
        ImprimantesClient f = new ImprimantesClient();
        f.setIdImprimante(id);
        f = ServiceImprimanteClient.rechercheImprimantesClient(s, f);
        ServiceImprimanteClient.removeImprimantesClient(s, f);
      }
    }

    request.setAttribute("messageAdd", "Supression  faite avec succès...");
    request.setAttribute(
        "inv", Utilitaire.setInventaire(s, Integer.parseInt(request.getParameter("idinv"))));
    request
        .getServletContext()
        .getRequestDispatcher("/modificationInventaire.jsp")
        .forward(request, response);
    s.close();
  }
  public static ImprimantesClient rechercheImprimantesClient(Session s, ImprimantesClient ic) {

    return (ImprimantesClient)
        PersistDAO.rechercheObject(s, ic, "idImprimante", ic.getIdImprimante());
  }