Merge origin/master

Conflicts:
	web/WEB-INF/AuthentificationJSP.jsp
This commit is contained in:
thomas.millot
2021-10-18 17:54:25 +02:00
parent 239a3b33e7
commit cc1a3760ef
2 changed files with 20 additions and 4 deletions

View File

@@ -5,6 +5,7 @@
*/
package com.test.servlets;
import com.test.forms.AuthentifForm;
import java.io.IOException;
import java.io.PrintWriter;
import jakarta.servlet.ServletException;
@@ -71,7 +72,17 @@ public class AuthentifServlet extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
// Création de l'objet leControle de type AuthentifForm
AuthentifForm leControle = new AuthentifForm();
// Appel de la méthode controlerAdmin
boolean isAdmin = leControle.controlerAdmin(request);
// Création de 2 attributs de requête (isAdmin et leControle)
request.setAttribute("isAdmin", isAdmin);
request.setAttribute("controlForm", leControle);
// Affichage de la JSP
getServletContext().getRequestDispatcher("/WEB-INF/ProfilJSP.jsp")
.forward(request, response);
}
/**