This commit is contained in:
parent
1ec492d570
commit
a9dec9bae4
@ -196,6 +196,19 @@ public class PompierMySql {
|
|||||||
resultQ.getInt("grade"),
|
resultQ.getInt("grade"),
|
||||||
resultQ.getString("commentaire")
|
resultQ.getString("commentaire")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
switch(resultQ.getInt("statut")){
|
||||||
|
case 1:
|
||||||
|
setResultat("Pompier");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
setResultat("Chef");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
setResultat("Alerte");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
HttpSession maSession = request.getSession();
|
HttpSession maSession = request.getSession();
|
||||||
maSession.setAttribute("lePompier", lePompier);
|
maSession.setAttribute("lePompier", lePompier);
|
||||||
}
|
}
|
||||||
@ -206,4 +219,8 @@ public class PompierMySql {
|
|||||||
return resultat;
|
return resultat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setResultat(String pompier) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,11 @@
|
|||||||
|
|
||||||
<!-- Si l'utilisateur s'est authentifié,
|
<!-- Si l'utilisateur s'est authentifié,
|
||||||
Affichage du message contenu dans l'objet controlForm de type AuthentifForm -->
|
Affichage du message contenu dans l'objet controlForm de type AuthentifForm -->
|
||||||
|
|
||||||
<p>${controlForm.getResultat()}</p>
|
<p>${controlForm.getResultat()}</p>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
<c:when test="${controlForm.getResultat()=='Chef'}">
|
||||||
|
<c:redirect url="ChefCaserne"></c:redirect>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="${controlForm.getResultat()=='Pompier'}">
|
||||||
|
<c:redirect url="Pompier"></c:redirect>
|
||||||
|
</c:when>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user