From cc1a3760efd25d54ecb9753fef5633973e253f68 Mon Sep 17 00:00:00 2001 From: "thomas.millot" Date: Mon, 18 Oct 2021 17:54:25 +0200 Subject: [PATCH] Merge origin/master Conflicts: web/WEB-INF/AuthentificationJSP.jsp --- src/java/com/test/servlets/AuthentifServlet.java | 13 ++++++++++++- web/WEB-INF/AuthentificationJSP.jsp | 11 ++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/java/com/test/servlets/AuthentifServlet.java b/src/java/com/test/servlets/AuthentifServlet.java index 80ed961..1e78fd0 100644 --- a/src/java/com/test/servlets/AuthentifServlet.java +++ b/src/java/com/test/servlets/AuthentifServlet.java @@ -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); } /** diff --git a/web/WEB-INF/AuthentificationJSP.jsp b/web/WEB-INF/AuthentificationJSP.jsp index ff45a8c..71b5650 100644 --- a/web/WEB-INF/AuthentificationJSP.jsp +++ b/web/WEB-INF/AuthentificationJSP.jsp @@ -4,19 +4,24 @@ Author : Chelloug.Eliass --%> <%@include file="jspf/enteteJSPF.jspf" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@page import="com.test.forms.AuthentifForm" %> + + +

Merci de vous identifier pour acceder aux dossiers

-
+
Identification utilisateur

- +

- +