Merge origin/master

Conflicts:
	nbproject/project.properties
	src/java/bean/Pompier.java
	src/java/servlet/PompierServlet.java
	src/java/util/TrmtDate.java
	web/WEB-INF/jspf/formulairePompier.jspf
	web/WEB-INF/jspf/header.jspf
	web/WEB-INF/web.xml
This commit is contained in:
clementine.desrucques 2021-12-13 11:07:06 +01:00
commit 8c53a38e4b
14 changed files with 2048 additions and 2003 deletions

142
build.xml
View File

@ -1,71 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="sdis29M1" default="default" basedir=".">
<description>Builds, tests, and runs the project sdis29M1.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-dist: called before archive building
-post-dist: called after archive building
-post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying
Example of pluging an obfuscator after the compilation could look like
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
The target of interest are:
init-macrodef-javac: defines macro for javac compilation
init-macrodef-junit: defines macro for junit execution
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
run: execution of project
javadoc-build: javadoc generation
Example of overriding the target for project execution could look like
<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that overridden target depends on jar target and not only on
compile target as regular run target does. Again, for list of available
properties which you can use check the target you are overriding in
nbproject/build-impl.xml file.
-->
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="sdis29M1" default="default" basedir=".">
<description>Builds, tests, and runs the project sdis29M1.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-dist: called before archive building
-post-dist: called after archive building
-post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying
Example of pluging an obfuscator after the compilation could look like
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
The target of interest are:
init-macrodef-javac: defines macro for javac compilation
init-macrodef-junit: defines macro for junit execution
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
run: execution of project
javadoc-build: javadoc generation
Example of overriding the target for project execution could look like
<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that overridden target depends on jar target and not only on
compile target as regular run target does. Again, for list of available
properties which you can use check the target you are overriding in
nbproject/build-impl.xml file.
-->
</project>

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
build.xml.data.CRC32=b54f128f
build.xml.script.CRC32=111e10f7
build.xml.stylesheet.CRC32=1707db4f@1.87.0.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=b54f128f
nbproject/build-impl.xml.script.CRC32=bc2b5756
nbproject/build-impl.xml.stylesheet.CRC32=334708a0@1.87.0.1
build.xml.data.CRC32=b54f128f
build.xml.script.CRC32=111e10f7
build.xml.stylesheet.CRC32=1707db4f@1.86.0.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=b54f128f
nbproject/build-impl.xml.script.CRC32=bc2b5756
nbproject/build-impl.xml.stylesheet.CRC32=334708a0@1.86.0.1

View File

@ -1,89 +1,89 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=true
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
build.classes.dir=${build.web.dir}/WEB-INF/classes
build.classes.excludes=**/*.java,**/*.form
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
build.web.dir=${build.dir}/web
build.web.excludes=${build.classes.excludes}
client.urlPart=authentification
compile.jsps=false
conf.dir=${source.root}/conf
debug.classpath=${build.classes.dir}:${javac.classpath}
debug.test.classpath=\
${run.test.classpath}
display.browser=true
# Files to be excluded from distribution war
dist.archive.excludes=
dist.dir=dist
dist.ear.war=${dist.dir}/${war.ear.name}
dist.javadoc.dir=${dist.dir}/javadoc
dist.war=${dist.dir}/${war.name}
endorsed.classpath=\
${libs.javaee-endorsed-api-7.0.classpath}
excludes=
file.reference.jakarta.servlet.jsp.jstl-2.0.0.jar=C:\\Users\\domin\\Downloads\\lib\\jakarta.servlet.jsp.jstl-2.0.0.jar
file.reference.jakarta.servlet.jsp.jstl-api-2.0.0.jar=C:\\Users\\domin\\Downloads\\lib\\jakarta.servlet.jsp.jstl-api-2.0.0.jar
file.reference.mysql-connector-java-8.0.26.jar=C:\\Users\\domin\\Downloads\\lib\\mysql-connector-java-8.0.26.jar
includes=**
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.server.type=Tomcat
jar.compress=false
javac.classpath=\
${file.reference.jakarta.servlet.jsp.jstl-2.0.0.jar}:\
${file.reference.jakarta.servlet.jsp.jstl-api-2.0.0.jar}:\
${file.reference.mysql-connector-java-8.0.26.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.debug=true
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.7
javac.target=1.7
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.preview=true
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
lib.dir=${web.docbase.dir}/WEB-INF/lib
persistence.xml.dir=${conf.dir}
platform.active=default_platform
resource.dir=setup
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
# Space-separated list of JVM arguments used when running a class with a main method or a unit test
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
runmain.jvmargs=
source.encoding=UTF-8
source.root=src
src.dir=${source.root}/java
test.src.dir=test
war.content.additional=
war.ear.name=${war.name}
war.name=sdis29M1.war
web.docbase.dir=web
webinf.dir=web/WEB-INF
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=true
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
build.classes.dir=${build.web.dir}/WEB-INF/classes
build.classes.excludes=**/*.java,**/*.form
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
build.web.dir=${build.dir}/web
build.web.excludes=${build.classes.excludes}
client.urlPart=authentification
compile.jsps=false
conf.dir=${source.root}/conf
debug.classpath=${build.classes.dir}:${javac.classpath}
debug.test.classpath=\
${run.test.classpath}
display.browser=true
# Files to be excluded from distribution war
dist.archive.excludes=
dist.dir=dist
dist.ear.war=${dist.dir}/${war.ear.name}
dist.javadoc.dir=${dist.dir}/javadoc
dist.war=${dist.dir}/${war.name}
endorsed.classpath=\
${libs.javaee-endorsed-api-7.0.classpath}
excludes=
file.reference.jakarta.servlet.jsp.jstl-2.0.0.jar=C:\\Users\\domin\\Downloads\\lib\\jakarta.servlet.jsp.jstl-2.0.0.jar
file.reference.jakarta.servlet.jsp.jstl-api-2.0.0.jar=C:\\Users\\domin\\Downloads\\lib\\jakarta.servlet.jsp.jstl-api-2.0.0.jar
file.reference.mysql-connector-java-8.0.26.jar=C:\\Users\\domin\\Downloads\\lib\\mysql-connector-java-8.0.26.jar
includes=**
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.server.type=Tomcat
jar.compress=false
javac.classpath=\
${file.reference.jakarta.servlet.jsp.jstl-2.0.0.jar}:\
${file.reference.jakarta.servlet.jsp.jstl-api-2.0.0.jar}:\
${file.reference.mysql-connector-java-8.0.26.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.debug=true
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.7
javac.target=1.7
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.preview=true
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
lib.dir=${web.docbase.dir}/WEB-INF/lib
persistence.xml.dir=${conf.dir}
platform.active=default_platform
resource.dir=setup
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
# Space-separated list of JVM arguments used when running a class with a main method or a unit test
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
runmain.jvmargs=
source.encoding=UTF-8
source.root=src
src.dir=${source.root}/java
test.src.dir=test
war.content.additional=
war.ear.name=${war.name}
war.name=sdis29M1.war
web.docbase.dir=web
webinf.dir=web/WEB-INF

View File

@ -1,31 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.web.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/web-project/3">
<name>sdis29M1</name>
<minimum-ant-version>1.6.5</minimum-ant-version>
<web-module-libraries>
<library dirs="200">
<file>${file.reference.jakarta.servlet.jsp.jstl-2.0.0.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library dirs="200">
<file>${file.reference.jakarta.servlet.jsp.jstl-api-2.0.0.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library dirs="200">
<file>${file.reference.mysql-connector-java-8.0.26.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
</web-module-libraries>
<web-module-additional-libraries/>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.web.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/web-project/3">
<name>sdis29M1</name>
<minimum-ant-version>1.6.5</minimum-ant-version>
<web-module-libraries>
<library dirs="200">
<file>${file.reference.jakarta.servlet.jsp.jstl-2.0.0.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library dirs="200">
<file>${file.reference.jakarta.servlet.jsp.jstl-api-2.0.0.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library dirs="200">
<file>${file.reference.mysql-connector-java-8.0.26.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
</web-module-libraries>
<web-module-additional-libraries/>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>

View File

@ -5,8 +5,9 @@
*/
package bdd;
import bean.Dispo;
import bean.Gardes;
import bean.Pompier;
import util.TrmtDate;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@ -15,49 +16,46 @@ import java.util.ArrayList;
import java.util.Calendar;
import java.util.logging.Level;
import java.util.logging.Logger;
import util.TrmtDate;
/**
*
* @author clementine.desrucques
* @author funcha.ahamadi
*/
public class DispoMySql {
public class gardeMySQL {
private final Connection theConnection = Connexion.getConnect("localhost",
"sdis29",
"adminBDsdis",
"mdpBDsdis");
public ArrayList<Dispo> getLesDispo(Calendar[] lesDates, String[] lesPeriodes) {
ArrayList<Dispo> lesP = new ArrayList<>();
Dispo uneDispo;
"mdpBDsdis");
public ArrayList<Gardes> getLesDisponibilite(Calendar[] lesDates, int[] lesPeriodes) {
ArrayList<Gardes> lesDispo = new ArrayList<>();
Gardes uneDispo;
/* a. Initialisation de la collection lesVentil pour la période,
création d'une ventil par salarié, par date et période
*/
int indiceDateFin = lesDates.length - 1;
Pompier leP;
PompierMySQL sm = new PompierMySQL();
ArrayList<Pompier> lesPom = sm.readAll();
for (Pompier unP : lesPom) {
Pompier lePompier;
PompierMySQL pm = new PompierMySQL();
ArrayList<Pompier> lesPompiers = pm.readLesPompiersCaserne(idCaserne);
for (Pompier unPompier : lesPompiers) {
for (Calendar uneDate : lesDates) {
for (String unePeriode : lesPeriodes) {
uneDispo = new Dispo(uneDate, unePeriode, unP);
lesP.add(uneDispo);
for (int unePeriode : lesPeriodes) {
uneDispo = new Gardes(uneDate, unePeriode, unPompier);
lesDispo.add(uneDispo);
}
}
}
/* b) Maj de la collection lesVentil
*/
readAll(lesPomp, lesDates[0], lesDates[indiceDateFin]);
//System.out.println("lesVentil : " + lesVentil);
return lesPomp;
readAll(lesDispo, lesDates[0], lesDates[indiceDateFin]);
//System.out.println("lesDispo : " + lesDispo);
return lesDispo;
}
public void readAll(ArrayList<Pompier> lesPomp, Calendar d1, Calendar d2) {
Pompier leP;
Dispo uneDispo;
Dispo laDispoTrouvee;
public void readAll(ArrayList<Gardes> lesDispo, Calendar d1, Calendar d2) {
Pompier lePompier;
Gardes uneDispo;
Gardes laDispoTrouvee;
String sql = "SELECT * FROM gardes "
+ "INNER JOIN pompier on idPompier = id "
+ "WHERE jourGarde BETWEEN ? and ?;";
@ -66,35 +64,25 @@ public class DispoMySql {
prepStmt.setDate(1, TrmtDate.getSQLDate(d1));
prepStmt.setDate(2, TrmtDate.getSQLDate(d2));
ResultSet resultat = prepStmt.executeQuery();
while (resultat.next()) {
leP = new Pompier(
while (resultat.next())
// public Pompier(Caserne laCaserne, int id, String nom, String prenom) {
lePompier = new Pompier(
resultat.getCaserne("laCaserne"),
resultat.getInt("id"),
resultat.getString("nom"),
resultat.getString("prenom"),
resultat.getParametre("leStatut"),
resultat.getParametre("leType"),
resultat.getString("mail"),
resultat.getString("login"),
resultat.getString("mdp"),
resultat.getString("adresse"),
resultat.getString("cp"),
resultat.getString("ville"),
resultat.getString("bip"),
resultat.getParametre("leGrade"),
resultat.getString("commentaire")
resultat.getString("prenom")
);
uneDispo = new Dispo(TrmtDate.getCalDate(resultat.getDate("jourVentil")),
resultat.getString("periode"),
leP);
// Recherche si unpompier existe dans les Pompier
uneDispo = new Gardes(TrmtDate.getCalDate(resultat.getDate("jourGarde")),
resultat.getInt("periode"),
lePompier);
// Recherche si uneDispo existe dans les Dispos
int indice = lesDispo.indexOf(uneDispo);
if (indice > -1) {
laDispoTrouvee = lesDispo.get(indice);
laDispoTrouvee.setActivite(resultat.getInt("dispo"));
laDispoTrouvee.setIsInBD(true);
laDispoTrouvee.setDisponibilite(resultat.getInt("disponibilite"));
laDispoTrouvee.setIsInBDD(true);
}
}
prepStmt.close();
resultat.close();
} catch (SQLException ex) {
@ -103,12 +91,12 @@ public class DispoMySql {
System.out.println("Code erreur : " + ex.getErrorCode());
}
}
/**
/**
* Suppression de la ventilation passé en param
* @param v : ventilation
* @return : nb lignes supprimées
*/
public int delete(Dispo p) {
public int delete(Gardes v) {
int nbMaj = -1;
String sql = "DELETE FROM gardes "
+ "WHERE idPompier = ? AND"
@ -116,9 +104,9 @@ public class DispoMySql {
+ "jourGarde = ?;";
try {
PreparedStatement prepStmt = theConnection.prepareStatement(sql);
prepStmt.setInt(1, p.getPompier().getId());
prepStmt.setString(2, p.getPeriode());
prepStmt.setDate(3, TrmtDate.getSQLDate(p.getJourVentil()));
prepStmt.setInt(1, v.getPompier().getId());
prepStmt.setInt(2, v.getPeriode());
prepStmt.setDate(3, TrmtDate.getSQLDate(v.getJourGarde()));
nbMaj= prepStmt.executeUpdate();
} catch (SQLException ex) {
@ -131,24 +119,24 @@ public class DispoMySql {
}
public int update(Dispo v) {
public int update(Gardes v) {
int nbMAJ = -1;
String sql = "UPDATE gardes "
+ "SET ventil = ? "
+ "WHERE idPompier = ? "
+ "WHERE idPompier= ? "
+ "AND jourGarde = ? "
+ "AND periode = ?";
try {
PreparedStatement prepStmt = theConnection.prepareStatement(sql);
prepStmt.setInt(1, v.getActivite());
prepStmt.setInt(1, v.getDisponibilite());
prepStmt.setInt(2, v.getPompier().getId());
prepStmt.setDate(3, TrmtDate.getSQLDate(v.getJourVentil()));
prepStmt.setString(4, v.getPeriode());
prepStmt.setDate(3, TrmtDate.getSQLDate(v.getJourGarde()));
prepStmt.setInt(4, v.getPeriode());
System.out.println("update : " + prepStmt);
nbMAJ = prepStmt.executeUpdate();
} catch (SQLException ex) {
Logger.getLogger(DispoMySql.class.getName()).log(Level.SEVERE, null, ex);
Logger.getLogger(gardeMySQL.class.getName()).log(Level.SEVERE, null, ex);
}
return nbMAJ;
}
@ -157,17 +145,17 @@ public class DispoMySql {
* @param v : ventil à créer
* @return : id du ventil
*/
public int create(Dispo v) {
public int create(Gardes v) {
int nbCre = -1;
String sql = "INSERT INTO gardes "
+ "(jourGarde, idPompier, periode, ventil)"
+ "(jourGarde, periode, idPompier, ventil)"
+ "VALUES (?, ?, ?, ?);";
try {
PreparedStatement prepStmt = theConnection.prepareStatement(sql);
prepStmt.setDate(1, TrmtDate.getSQLDate(v.getJourVentil()));
prepStmt.setString(2, v.getPeriode());
prepStmt.setDate(1, TrmtDate.getSQLDate(v.getJourGarde()));
prepStmt.setInt(2, v.getPeriode());
prepStmt.setInt(3, v.getPompier().getId());
prepStmt.setInt(4, v.getActivite());
prepStmt.setInt(4, v.getDisponibilite());
int nbLigne= prepStmt.executeUpdate();
if (nbLigne > 0) {
ResultSet result = prepStmt.getGeneratedKeys();
@ -183,5 +171,13 @@ public class DispoMySql {
}
return nbCre;
}
}
}

View File

@ -1,123 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package bean;
import java.util.Calendar;
import java.util.Objects;
/**
*
* @author clementine.desrucques
*/
public class Dispo {
Calendar JourVentil;
String periode;
Pompier pompier;
int activite;
boolean isInBD;
public Dispo(Calendar JourVentil, String periode, Pompier pompier, int activite, boolean isInBD) {
this.JourVentil = JourVentil;
this.periode = periode;
this.pompier = pompier;
this.activite = activite;
this.isInBD = isInBD;
}
public Dispo(Calendar JourVentil, String periode, Pompier pompier) {
this.JourVentil = JourVentil;
this.periode = periode;
this.pompier = pompier;
}
public Calendar getJourVentil() {
return JourVentil;
}
public void setJourVentil(Calendar JourVentil) {
this.JourVentil = JourVentil;
}
public String getPeriode() {
return periode;
}
public void setPeriode(String periode) {
this.periode = periode;
}
public Pompier getPompier() {
return pompier;
}
public void setPompier(Pompier pompier) {
this.pompier = pompier;
}
public int getActivite() {
return activite;
}
public void setActivite(int activite) {
this.activite = activite;
}
public boolean isIsInBD() {
return isInBD;
}
public void setIsInBD(boolean isInBD) {
this.isInBD = isInBD;
}
@Override
public int hashCode() {
int hash = 7;
hash = 79 * hash + Objects.hashCode(this.JourVentil);
hash = 79 * hash + Objects.hashCode(this.periode);
hash = 79 * hash + Objects.hashCode(this.pompier);
hash = 79 * hash + this.activite;
hash = 79 * hash + (this.isInBD ? 1 : 0);
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Dispo other = (Dispo) obj;
if (this.activite != other.activite) {
return false;
}
if (this.isInBD != other.isInBD) {
return false;
}
if (!Objects.equals(this.periode, other.periode)) {
return false;
}
if (!Objects.equals(this.JourVentil, other.JourVentil)) {
return false;
}
if (!Objects.equals(this.pompier, other.pompier)) {
return false;
}
return true;
}
@Override
public String toString() {
return "Dispo{" + "JourVentil=" + JourVentil + ", periode=" + periode + ", pompier=" + pompier + ", activite=" + activite + ", isInBD=" + isInBD + '}';
}
}

123
src/java/bean/Gardes.java Normal file
View File

@ -0,0 +1,123 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package bean;
import java.util.Calendar;
import java.util.Objects;
/**
*
* @author funcha.ahamadi
*/
public class Gardes {
Calendar jourGarde;
int periode;
Pompier pompier;
int disponibilite;
boolean isInBDD;
public Gardes(Calendar jourGarde, int periode, Pompier pompier, int disponibilite, boolean isInBDD) {
this.jourGarde = jourGarde;
this.periode = periode;
this.pompier = pompier;
this.disponibilite = disponibilite;
this.isInBDD = isInBDD;
}
public Gardes(Calendar jourGarde, int periode, Pompier pompier) {
this.jourGarde = jourGarde;
this.periode = periode;
this.pompier = pompier;
}
public Calendar getJourGarde() {
return jourGarde;
}
public void setJourGarde(Calendar jourGarde) {
this.jourGarde = jourGarde;
}
public int getPeriode() {
return periode;
}
public void setPeriode(int periode) {
this.periode = periode;
}
public Pompier getPompier() {
return pompier;
}
public void setPompier(Pompier pompier) {
this.pompier = pompier;
}
public int getDisponibilite() {
return disponibilite;
}
public void setDisponibilite(int disponibilite) {
this.disponibilite = disponibilite;
}
public boolean isIsInBDD() {
return isInBDD;
}
public void setIsInBDD(boolean isInBDD) {
this.isInBDD = isInBDD;
}
@Override
public int hashCode() {
int hash = 7;
hash = 43 * hash + Objects.hashCode(this.jourGarde);
hash = 43 * hash + this.periode;
hash = 43 * hash + Objects.hashCode(this.pompier);
hash = 43 * hash + this.disponibilite;
hash = 43 * hash + (this.isInBDD ? 1 : 0);
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Gardes other = (Gardes) obj;
if (this.periode != other.periode) {
return false;
}
if (this.disponibilite != other.disponibilite) {
return false;
}
if (this.isInBDD != other.isInBDD) {
return false;
}
if (!Objects.equals(this.jourGarde, other.jourGarde)) {
return false;
}
if (!Objects.equals(this.pompier, other.pompier)) {
return false;
}
return true;
}
@Override
public String toString() {
return "Gardes{" + "jourGarde=" + jourGarde + ", periode=" + periode + ", pompier=" + pompier + ", disponibilite=" + disponibilite + ", isInBDD=" + isInBDD + '}';
}
}

View File

@ -5,8 +5,8 @@
*/
package form;
import bdd.DispoMySql;
import bean.Dispo;
import bdd.gardeMySQL;
import bean.Gardes;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;
import java.util.ArrayList;
@ -21,28 +21,28 @@ public class DispoForm {
public void verifDispo(HttpServletRequest request){
HttpSession maS = request.getSession();
ArrayList <Dispo> lesDispo = (ArrayList<Dispo>) maS.getAttribute("lesVentilInit");
ArrayList <Gardes> lesG = (ArrayList<Gardes>) maS.getAttribute("lesVentilInit");
DispoMySql vm = new DispoMySql();
gardeMySQL vm = new gardeMySQL();
Map<String, String[]> map = request.getParameterMap();
String[] lesNvVentil = map.get("lesAct");
int i = 0;
for(Dispo uneDispo : lesDispo){
int oldAct = uneDispo.getActivite();
for(Gardes uneGarde : lesG){
int oldAct = uneGarde.getDisponibilite();
int newAct = Integer.parseInt(lesNvVentil[i]);
if(oldAct != newAct){
if(uneDispo.isIsInBD()){
if(uneGarde.isIsInBDD()){
if(newAct == 0){
vm.delete(uneDispo);
uneDispo.setIsInBD(false);
vm.delete(uneGarde);
uneGarde.setIsInBDD(false);
} else {
uneDispo.setActivite(newAct);
vm.update(uneDispo);
uneGarde.setDisponibilite(newAct);
vm.update(uneGarde);
}
} else {
uneDispo.setActivite(newAct);
vm.create(uneDispo);
uneDispo.setIsInBD(true);
uneGarde.setDisponibilite(newAct);
vm.create(uneGarde);
uneGarde.setIsInBDD(true);
}
}
i++;

View File

@ -5,25 +5,26 @@
*/
package servlet;
import bdd.DispoMySql;
import bean.Dispo;
import bdd.gardeMySQL;
import bean.Gardes;
import bean.Pompier;
import form.DispoForm;
import jakarta.servlet.http.HttpServlet;
import util.TrmtDate;
import java.io.IOException;
import java.io.PrintWriter;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.Calendar;
import util.TrmtDate;
/**
*
* @author clementine.desrucques
* @author funcha.ahamadi
*/
public class DispoServlet extends HttpServlet {
public class GardesServlet extends HttpServlet {
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
@ -42,10 +43,10 @@ public class DispoServlet extends HttpServlet {
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet DispoServlet</title>");
out.println("<title>Servlet feuilleGardes</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet DispoServlet at " + request.getContextPath() + "</h1>");
out.println("<h1>Servlet feuilleGardes at " + request.getContextPath() + "</h1>");
out.println("</body>");
out.println("</html>");
}
@ -63,40 +64,34 @@ public class DispoServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// processRequest(request, response);
HttpSession maSession = request.getSession();
if (maSession.getAttribute("lesVentilInit") == null) {
/* Initialisations des dates de la semaine */
Calendar[] lesDates = new Calendar[5];
String[] lesDatesEnString = new String[5];
lesDates[0] = TrmtDate.getDateDebutSemaine();
lesDatesEnString[0] = TrmtDate.getDateAAfficher(lesDates[0]);
for (int i = 1; i < lesDates.length; i++) {
lesDates[i] = TrmtDate.addDays(lesDates[0], i);
lesDatesEnString[i] = TrmtDate.getDateAAfficher(lesDates[i]);
}
maSession.setAttribute("lesDates", lesDates);
maSession.setAttribute("lesDatesEnString", lesDatesEnString);
//System.out.println("lesDates "+ lesDates[4].getTime());
/* Initialisation des périodes */
String[] lesPeriodes = {"AM", "PM"};
maSession.setAttribute("lesPeriodes", lesPeriodes);
/* Recherche des ventilations */
DispoMySql vm = new DispoMySql();
ArrayList<Dispo> lesVentilInit = vm.getLesDispo(lesDates, lesPeriodes);
//processRequest(request, response);
HttpSession maSession = request.getSession();
ArrayList<Pompier> lesPompiers = (ArrayList<Pompier>) maSession.getAttribute("lesPompiers");
Calendar[] lesDates = new Calendar[7];
String[] lesDatesEnString = new String[7];
lesDates[0] = TrmtDate.getDateDebutSemaine();
lesDatesEnString[0] = TrmtDate.getDateAAfficher(lesDates[0]);
for (int i = 1; i < lesDates.length; i++) {
lesDates[i] = TrmtDate.addDays(lesDates[0], i);
lesDatesEnString[i] = TrmtDate.getDateAAfficher(lesDates[i]);
}
maSession.setAttribute("lesDates", lesDates);
maSession.setAttribute("lesDatesEnString", lesDatesEnString);
/*Initialisation des periodes */
int[] lesPeriodes = {1,2,3,4};
maSession.setAttribute("lesPeriodes", lesPeriodes);
/* Recherche des ventilations */
gardeMySQL vm = new gardeMySQL();
ArrayList<Gardes> lesVentilInit = vm.getLesDisponibilite(lesDates, lesPeriodes);
//System.out.println("lesVentilInit : " + lesVentilInit);
maSession.setAttribute("lesVentilInit", lesVentilInit);
/* Initialisation des couleurs */
String[] lesCouleurs = {"blanc", "gris", "jaune"};
maSession.setAttribute("lesCouleurs", lesCouleurs);
}
/* Affichage de la page de ventilation */
getServletContext().getRequestDispatcher("/WEB-INF/gardeJSP.jsp").forward(request, response);
/* Affichage de la page de ventilation */
getServletContext().getRequestDispatcher("/WEB-INF/feuilleGardesJSP.jsp").forward(request, response);
}
/**

View File

@ -1,129 +1,129 @@
package util;
/*
* Classe abstraite facilitant le traitement des dates
* Toutes les méthodes sont statiques, appel : TrmtDate.nomMéthode
*/
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.TimeZone;
/**
*
* @author Dominique_2
*/
public abstract class TrmtDate {
static Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("Europe/Paris"));
/**
* Recherche de la date du début de la semaine courante
* @return date du lundi de la semaine, format Calendar
*/
public static Calendar getDateDebutSemaine() {
return getDateDebutSemaine(getDateDuJour());
}
/**
* Recherche de la date du début de semaine à partir de la date passée en paramètre
* @param c Calendar, date de recherche
* @return Calendar, début semaine à partir de c
*/
public static Calendar getDateDebutSemaine(Calendar c) {
Calendar leCal = getClone(c);
leCal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
//System.out.println("Date du lundi correspondant : " + nvCal.getTime());
return leCal;
}
/**
* Retourne la date passée en paramètre sous la forme : lun.05/10 par exemple
* @param d date à transformer
* @return chaine de car., forme lun.05/10 par exemple
*/
public static String getDateAAfficher(Calendar d) {
Locale locale = Locale.getDefault();
String dateAAfficher = d.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT, locale);
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM");
String jrMois = sdf.format(d.getTime());
dateAAfficher += jrMois;
return dateAAfficher;
}
/**
* Retourne une date égale à la date passée en paramètre plus le nb jours indiqués
* @param dateInit date initiale, format Calendar
* @param days nb jours à ajouter
* @return dateInit + days, format Calendar
*/
public static Calendar addDays(Calendar dateInit, int days) {
Calendar leCal = getClone(dateInit);
leCal.setTime(dateInit.getTime());
leCal.add(Calendar.DAY_OF_MONTH, days);
return leCal;
}
/**
* Retourne une instance de Calendar correspondant à la date au format SQl
* passée en paramètre
* @param sqlDate : date au format java.sql.Date
* @return instance de Calendar
*/
public static Calendar getCalDate(java.sql.Date sqlDate) {
cal.setTime(new java.util.Date(sqlDate.getTime()));
return cal;
}
/**
* Retourne une date sql à partir d'une instance de Calendar
* @param unCal
* @return date sql
*/
public static java.sql.Date getSQLDate(Calendar unCal) {
return new java.sql.Date(unCal.getTimeInMillis());
}
/**
* Retourne une instance de Calendar correspondant à la date
* passée en paramètre
* @param utilDate : date au format java.util.Date
* @return instance de Calendar
*/
public static Calendar getCalDate(java.util.Date utilDate) {
cal.setTime(utilDate);
return cal;
}
/**
* Retourne la date du jour au format SQL
* @return Date au format sql
*/
public static java.sql.Date getSQLDateDuJour() {
return java.sql.Date.valueOf(java.time.LocalDate.now());
}
/**
* Retourne la date du jour au format Calendar
* @return Calendar
*/
public static Calendar getDateDuJour() {
Calendar nvCal = new GregorianCalendar(TimeZone.getTimeZone("Europe/Paris"));
nvCal.set(Calendar.HOUR_OF_DAY, 0);
nvCal.set(Calendar.MINUTE, 0);
nvCal.set(Calendar.SECOND, 0);
nvCal.set(Calendar.MILLISECOND, 0);
//System.out.println("Date du jour : " + nvCal.getTime());
return nvCal;
}
/**
* Permet d'obtenir une autre instance de Calendar identique à celle passée en paramètre
* @param c Calendar à cloner
* @return nouvelle instance de Calendar
*/
public static Calendar getClone(Calendar c) {
Calendar leCal = Calendar.getInstance();
leCal.setTime(c.getTime());
return leCal;
}
}
package util;
/*
* Classe abstraite facilitant le traitement des dates
* Toutes les méthodes sont statiques, appel : TrmtDate.nomMéthode
*/
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.TimeZone;
/**
*
* @author Dominique_2
*/
public abstract class TrmtDate {
static Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("Europe/Paris"));
/**
* Recherche de la date du début de la semaine courante
* @return date du lundi de la semaine, format Calendar
*/
public static Calendar getDateDebutSemaine() {
return getDateDebutSemaine(getDateDuJour());
}
/**
* Recherche de la date du début de semaine à partir de la date passée en paramètre
* @param c Calendar, date de recherche
* @return Calendar, début semaine à partir de c
*/
public static Calendar getDateDebutSemaine(Calendar c) {
Calendar leCal = getClone(c);
leCal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
//System.out.println("Date du lundi correspondant : " + nvCal.getTime());
return leCal;
}
/**
* Retourne la date passée en paramètre sous la forme : lun.05/10 par exemple
* @param d date à transformer
* @return chaine de car., forme lun.05/10 par exemple
*/
public static String getDateAAfficher(Calendar d) {
Locale locale = Locale.getDefault();
String dateAAfficher = d.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT, locale);
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM");
String jrMois = sdf.format(d.getTime());
dateAAfficher += jrMois;
return dateAAfficher;
}
/**
* Retourne une date égale à la date passée en paramètre plus le nb jours indiqués
* @param dateInit date initiale, format Calendar
* @param days nb jours à ajouter
* @return dateInit + days, format Calendar
*/
public static Calendar addDays(Calendar dateInit, int days) {
Calendar leCal = getClone(dateInit);
leCal.setTime(dateInit.getTime());
leCal.add(Calendar.DAY_OF_MONTH, days);
return leCal;
}
/**
* Retourne une instance de Calendar correspondant à la date au format SQl
* passée en paramètre
* @param sqlDate : date au format java.sql.Date
* @return instance de Calendar
*/
public static Calendar getCalDate(java.sql.Date sqlDate) {
cal.setTime(new java.util.Date(sqlDate.getTime()));
return cal;
}
/**
* Retourne une date sql à partir d'une instance de Calendar
* @param unCal
* @return date sql
*/
public static java.sql.Date getSQLDate(Calendar unCal) {
return new java.sql.Date(unCal.getTimeInMillis());
}
/**
* Retourne une instance de Calendar correspondant à la date
* passée en paramètre
* @param utilDate : date au format java.util.Date
* @return instance de Calendar
*/
public static Calendar getCalDate(java.util.Date utilDate) {
cal.setTime(utilDate);
return cal;
}
/**
* Retourne la date du jour au format SQL
* @return Date au format sql
*/
public static java.sql.Date getSQLDateDuJour() {
return java.sql.Date.valueOf(java.time.LocalDate.now());
}
/**
* Retourne la date du jour au format Calendar
* @return Calendar
*/
public static Calendar getDateDuJour() {
Calendar nvCal = new GregorianCalendar(TimeZone.getTimeZone("Europe/Paris"));
nvCal.set(Calendar.HOUR_OF_DAY, 0);
nvCal.set(Calendar.MINUTE, 0);
nvCal.set(Calendar.SECOND, 0);
nvCal.set(Calendar.MILLISECOND, 0);
//System.out.println("Date du jour : " + nvCal.getTime());
return nvCal;
}
/**
* Permet d'obtenir une autre instance de Calendar identique à celle passée en paramètre
* @param c Calendar à cloner
* @return nouvelle instance de Calendar
*/
public static Calendar getClone(Calendar c) {
Calendar leCal = Calendar.getInstance();
leCal.setTime(c.getTime());
return leCal;
}
}

View File

@ -0,0 +1,54 @@
<%--
Document : feuilleGardes
Created on : 6 déc. 2021, 15:07:45
Author : funcha.ahamadi
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<legend>
Feuille de gardes
</legend>
<form action="gardes" method="POST">
<table class="table">
<thead>
<tr>
<th rowspan="2">N° de BIP</th>
<th rowspan="2">Nom Prenom</th>
<c:forEach items='${sessionScope.lesDatesEnString}' var="uneDate" varStatus="status">
<th colspan="2" class="text-center"> ${uneDate}</th>
</c:forEach>
</tr>
<tr>
<c:forEach var="i" begin="0" end="4" step="1">
<c:forEach items='${sessionScope.lesPeriodes}' var="unePeriode" varStatus="status">
<td class="text-center">${unePeriode}</td>
</c:forEach>
</c:forEach>
</tr>
</thead>
<tbody>
<c:set var="oldId" value="-1" scope="page"/>
<tr>
<c:forEach items='${sessionScope.lesVentilInit}' var="uneVentil" varStatus="status">
<c:set var="newId" value='${uneVentil.getPompier().getId()}' scope="page"/>
<c:if test='${oldId != newId}' var="test" scope="page">
</tr><tr>
<td>${uneVentil.getPompier().getId()}</td>
<td>${uneVentil.getPompier().getNom()} ${uneVentil.getPompier().getPrenom()}</td>
<c:set var="oldId" value='${newId}' scope="page"/>
</c:if>
<c:set var="activite" value='${uneVentil.getActivite()}' scope="page"/>
<td>
<input readonly type="text" value='${activite}' name="lesActivites"class="ztVentil ${sessionScope.lesCouleurs[activite]}"/>
</td>
</c:forEach>
</tr>
</tbody>
</table>
</form><!-- comment -->

View File

@ -109,4 +109,4 @@
</nav>
</div> <!-- fin id=identie -->
</div> <!-- fin class=container -->
</header>
</header>

View File

@ -17,8 +17,8 @@
<servlet-class>servlet.PompierServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>DispoServlet</servlet-name>
<servlet-class>servlet.DispoServlet</servlet-class>
<servlet-name>feuilleGardes</servlet-name>
<servlet-class>servlet.GardesServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AuthentifServlet</servlet-name>
@ -29,8 +29,8 @@
<url-pattern>/pompier</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DispoServlet</servlet-name>
<url-pattern>/DispoServlet</url-pattern>
<servlet-name>feuilleGardes</servlet-name>
<url-pattern>/gardes</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>