Merge origin/master
Conflicts: web/WEB-INF/AuthentificationJSP.jsp
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user