diff --git a/nbproject/project.properties b/nbproject/project.properties index f2ff277..3e2694a 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -36,7 +36,7 @@ j2ee.compile.on.save=true j2ee.copy.static.files.on.save=true j2ee.deploy.on.save=true j2ee.platform=1.7-web -j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-ssi.jar:${j2ee.server.home}/lib/catalina-storeconfig.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.20.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jakartaee-migration-1.0.0-shaded.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jaspic-api.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-cs.jar:${j2ee.server.home}/lib/tomcat-i18n-de.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-i18n-ko.jar:${j2ee.server.home}/lib/tomcat-i18n-pt-BR.jar:${j2ee.server.home}/lib/tomcat-i18n-ru.jar:${j2ee.server.home}/lib/tomcat-i18n-zh-CN.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-jni.jar:${j2ee.server.home}/lib/tomcat-util-scan.jar:${j2ee.server.home}/lib/tomcat-util.jar:${j2ee.server.home}/lib/tomcat-websocket.jar:${j2ee.server.home}/lib/websocket-api.jar +j2ee.platform.classpath=${j2ee.server.domain}/lib/annotations-api.jar:${j2ee.server.domain}/lib/catalina-ant.jar:${j2ee.server.domain}/lib/catalina-ha.jar:${j2ee.server.domain}/lib/catalina-ssi.jar:${j2ee.server.domain}/lib/catalina-storeconfig.jar:${j2ee.server.domain}/lib/catalina-tribes.jar:${j2ee.server.domain}/lib/catalina.jar:${j2ee.server.domain}/lib/ecj-4.20.jar:${j2ee.server.domain}/lib/el-api.jar:${j2ee.server.domain}/lib/jakartaee-migration-1.0.0-shaded.jar:${j2ee.server.domain}/lib/jasper-el.jar:${j2ee.server.domain}/lib/jasper.jar:${j2ee.server.domain}/lib/jaspic-api.jar:${j2ee.server.domain}/lib/jsp-api.jar:${j2ee.server.domain}/lib/servlet-api.jar:${j2ee.server.domain}/lib/tomcat-api.jar:${j2ee.server.domain}/lib/tomcat-coyote.jar:${j2ee.server.domain}/lib/tomcat-dbcp.jar:${j2ee.server.domain}/lib/tomcat-i18n-cs.jar:${j2ee.server.domain}/lib/tomcat-i18n-de.jar:${j2ee.server.domain}/lib/tomcat-i18n-es.jar:${j2ee.server.domain}/lib/tomcat-i18n-fr.jar:${j2ee.server.domain}/lib/tomcat-i18n-ja.jar:${j2ee.server.domain}/lib/tomcat-i18n-ko.jar:${j2ee.server.domain}/lib/tomcat-i18n-pt-BR.jar:${j2ee.server.domain}/lib/tomcat-i18n-ru.jar:${j2ee.server.domain}/lib/tomcat-i18n-zh-CN.jar:${j2ee.server.domain}/lib/tomcat-jdbc.jar:${j2ee.server.domain}/lib/tomcat-jni.jar:${j2ee.server.domain}/lib/tomcat-util-scan.jar:${j2ee.server.domain}/lib/tomcat-util.jar:${j2ee.server.domain}/lib/tomcat-websocket.jar:${j2ee.server.domain}/lib/websocket-api.jar j2ee.server.type=Tomcat jar.compress=false javac.classpath=\ diff --git a/src/java/bdd/GardeMySQL.java b/src/java/bdd/GardeMySQL.java index abf917f..2183adf 100644 --- a/src/java/bdd/GardeMySQL.java +++ b/src/java/bdd/GardeMySQL.java @@ -8,6 +8,8 @@ package bdd; import bean.Caserne; import bean.Gardes; import bean.Pompier; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpSession; import java.sql.Connection; import java.sql.PreparedStatement; @@ -29,7 +31,8 @@ public class GardeMySQL { "sdis29", "adminBDsdis", "mdpBDsdis"); - public ArrayList getLesDisponibilite(Calendar[] lesDates, int[] lesPeriodes) { + public ArrayList getLesDisponibilite(Calendar[] lesDates, int[] lesPeriodes,HttpServletRequest request) { + ArrayList lesDispo = new ArrayList<>(); Gardes uneDispo; @@ -39,8 +42,9 @@ public class GardeMySQL { int indiceDateFin = lesDates.length - 1; Pompier lePompier; PompierMySQL pm = new PompierMySQL(); - - ArrayList lesPompiers = new ArrayList<>(); + HttpSession maSession = request.getSession(); + ArrayList lesPompiers = (ArrayList) maSession.getAttribute("lesPompiers"); + for (Pompier unPompier : lesPompiers) { for (Calendar uneDate : lesDates) { for (int unePeriode : lesPeriodes) { diff --git a/src/java/servlet/GardesServlet.java b/src/java/servlet/GardesServlet.java index 2e7300e..a5a993f 100644 --- a/src/java/servlet/GardesServlet.java +++ b/src/java/servlet/GardesServlet.java @@ -90,7 +90,7 @@ public class GardesServlet extends HttpServlet { /* Recherche des ventilations */ GardeMySQL vm = new GardeMySQL(); - ArrayList lesVentilInit = vm.getLesDisponibilite(lesDates, lesPeriodes); + ArrayList lesVentilInit = vm.getLesDisponibilite(lesDates, lesPeriodes,request); //System.out.println("lesVentilInit : " + lesVentilInit); maSession.setAttribute("lesVentilInit", lesVentilInit); diff --git a/web/WEB-INF/feuilleGardes.jsp b/web/WEB-INF/feuilleGardes.jsp index f7d291f..8c58418 100644 --- a/web/WEB-INF/feuilleGardes.jsp +++ b/web/WEB-INF/feuilleGardes.jsp @@ -36,6 +36,26 @@ + + + + + + + + ${uneVentil.getPompier().getId()} + ${uneVentil.getPompier().getNom()} ${uneVentil.getPompier().getPrenom()} + + + + + + + + + + +
@@ -50,6 +70,22 @@
+ diff --git a/web/css/mycss.css b/web/css/mycss.css index 301579b..f42e963 100644 --- a/web/css/mycss.css +++ b/web/css/mycss.css @@ -18,7 +18,7 @@ body { } fieldset { border-radius: 5px; - padding: 2px; + padding: 3px; border: 1px solid #DB0005; width: 100%; } @@ -103,8 +103,8 @@ select[readonly] { } .ztVentil { - width : 40%; - border: 3px solid; + width : 15px; + border-color: black; }