From 9c8ff01a79d16d1496e37649dc877a41df220977 Mon Sep 17 00:00:00 2001 From: "clementine.desrucques" Date: Mon, 18 Oct 2021 15:51:58 +0200 Subject: [PATCH] --- src/java/com/test/forms/NouveauPompForm.java | 9 +++++---- web/WEB-INF/CreaPompier.jsp | 17 +++++++++++++++++ web/WEB-INF/ModifPompier.jsp | 17 +++++++++++++++++ 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 web/WEB-INF/CreaPompier.jsp create mode 100644 web/WEB-INF/ModifPompier.jsp diff --git a/src/java/com/test/forms/NouveauPompForm.java b/src/java/com/test/forms/NouveauPompForm.java index 1f14178..5fa2f42 100644 --- a/src/java/com/test/forms/NouveauPompForm.java +++ b/src/java/com/test/forms/NouveauPompForm.java @@ -44,7 +44,8 @@ public class NouveauPompForm { if (erreur > 0) return -1; // Creation d'un objet de type Client avec les données transmises - Pompier unPompier = new Pompier(request.getParameter("idCaserne"), + Pompier unPompier = new Pompier(request.getParameter("id"), +// request.getParameter("idCaserne"), request.getParameter("ztNom"), request.getParameter("ztPrenom"), request.getParameter("statut"), @@ -57,11 +58,11 @@ public class NouveauPompForm { request.getParameter("ztVille"), request.getParameter("grade")); ClientMysql cm = new ClientMysql(); - int idClient = cm.createRP(unPompier); // Requête préparée - if (idClient == -1) { + int id = cm.createRP(unPompier); // Requête préparée + if (id == -1) { message = "Erreur lors de la création du client"; } - return idClient; + return id; } diff --git a/web/WEB-INF/CreaPompier.jsp b/web/WEB-INF/CreaPompier.jsp new file mode 100644 index 0000000..92ca989 --- /dev/null +++ b/web/WEB-INF/CreaPompier.jsp @@ -0,0 +1,17 @@ +<%-- + Document : CreaPompier + Created on : 18 oct. 2021, 15:49:36 + Author : clementine.desrucques +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + JSP Page + + +

Hello World!

+ + diff --git a/web/WEB-INF/ModifPompier.jsp b/web/WEB-INF/ModifPompier.jsp new file mode 100644 index 0000000..ced54b1 --- /dev/null +++ b/web/WEB-INF/ModifPompier.jsp @@ -0,0 +1,17 @@ +<%-- + Document : ModifPompier + Created on : 18 oct. 2021, 15:49:00 + Author : clementine.desrucques +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + JSP Page + + +

Hello World!

+ +