Merge origin/master
Conflicts: web/WEB-INF/AuthentificationJSP.jsp
This commit is contained in:
		@@ -5,6 +5,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
package com.test.servlets;
 | 
					package com.test.servlets;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.test.forms.AuthentifForm;
 | 
				
			||||||
import java.io.IOException;
 | 
					import java.io.IOException;
 | 
				
			||||||
import java.io.PrintWriter;
 | 
					import java.io.PrintWriter;
 | 
				
			||||||
import jakarta.servlet.ServletException;
 | 
					import jakarta.servlet.ServletException;
 | 
				
			||||||
@@ -71,7 +72,17 @@ public class AuthentifServlet extends HttpServlet {
 | 
				
			|||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
 | 
					    protected void doPost(HttpServletRequest request, HttpServletResponse response)
 | 
				
			||||||
            throws ServletException, IOException {
 | 
					            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); 
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,10 +35,10 @@ public class ProfilServlet extends HttpServlet {
 | 
				
			|||||||
            out.println("<!DOCTYPE html>");
 | 
					            out.println("<!DOCTYPE html>");
 | 
				
			||||||
            out.println("<html>");
 | 
					            out.println("<html>");
 | 
				
			||||||
            out.println("<head>");
 | 
					            out.println("<head>");
 | 
				
			||||||
            out.println("<title>Servlet Profil</title>");
 | 
					            out.println("<title>Servlet ProfilServlets</title>");
 | 
				
			||||||
            out.println("</head>");
 | 
					            out.println("</head>");
 | 
				
			||||||
            out.println("<body>");
 | 
					            out.println("<body>");
 | 
				
			||||||
            out.println("<h1>Servlet ProfilServlet at " + request.getContextPath() + "</h1>");
 | 
					            out.println("<h1>Servlet ProfilServlets at " + request.getContextPath() + "</h1>");
 | 
				
			||||||
            out.println("</body>");
 | 
					            out.println("</body>");
 | 
				
			||||||
            out.println("</html>");
 | 
					            out.println("</html>");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -70,9 +70,9 @@ public class ProfilServlet extends HttpServlet {
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
 | 
					    protected void doPost(HttpServletRequest request, HttpServletResponse response)
 | 
				
			||||||
            throws ServletException, IOException 
 | 
					            throws ServletException, IOException {
 | 
				
			||||||
    {
 | 
					        getServletContext().getRequestDispatcher("/WEB-INF/ProfilJSP.jsp")
 | 
				
			||||||
        processRequest(request, response);
 | 
					                 .forward(request, response);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,13 @@
 | 
				
			|||||||
<%-- 
 | 
					<%-- 
 | 
				
			||||||
    Document   : authentificationJSP
 | 
					    Document   : authentificationJSP
 | 
				
			||||||
    Created on : 18 oct. 2021, 11:09:26
 | 
					    Created on : 18 oct. 2021, 11:09:26
 | 
				
			||||||
    Author     : Chelloug.Eliass
 | 
					    Author     : Millot.Thomas
 | 
				
			||||||
--%>
 | 
					--%>
 | 
				
			||||||
<%@include file="jspf/enteteJSPF.jspf" %>
 | 
					<%@include file="jspf/enteteJSPF.jspf" %>
 | 
				
			||||||
 | 
					<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
 | 
				
			||||||
 | 
					<%@page import="com.test.forms.AuthentifForm" %>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<!-- Affichage du formulaire si l'utilisateur ne s'est pas encore authentifi<66> -->
 | 
				
			||||||
<div id="contenu">
 | 
					<div id="contenu">
 | 
				
			||||||
    <h2>Merci de vous identifier pour acceder aux dossiers</h2>
 | 
					    <h2>Merci de vous identifier pour acceder aux dossiers</h2>
 | 
				
			||||||
    <form name="frmIdentification" method="POST" action="Profil">  
 | 
					    <form name="frmIdentification" method="POST" action="Profil">  
 | 
				
			||||||
@@ -12,11 +16,11 @@
 | 
				
			|||||||
                <fieldset><legend>Identification utilisateur</legend>
 | 
					                <fieldset><legend>Identification utilisateur</legend>
 | 
				
			||||||
                    <br /><br />
 | 
					                    <br /><br />
 | 
				
			||||||
                    <label for="nom">Nom du compte</label>
 | 
					                    <label for="nom">Nom du compte</label>
 | 
				
			||||||
                    <input id="login" 	type="text" 	name="login"  size="30" maxlength="45" 	placeholder="Entrez votre nom d'Utilisateur">
 | 
					                    <input type="text" 	name="ztPseudo"  size="30" maxlength="45" 	placeholder="Entrez votre nom d'Utilisateur">
 | 
				
			||||||
                    </p>
 | 
					                    </p>
 | 
				
			||||||
                    <p>
 | 
					                    <p>
 | 
				
			||||||
                        <label for="mdp">Mot de passe</label>
 | 
					                        <label for="mdp">Mot de passe</label>
 | 
				
			||||||
                        <input id="mdp" 	type="password"  name="mdp" size="30" 	maxlength="45" 	placeholder="Entrez votre Mot de Passe">
 | 
					                        <input type="password"  name="ztMDP" size="30" 	maxlength="45" 	placeholder="Entrez votre Mot de Passe">
 | 
				
			||||||
                    </p><br /><br />
 | 
					                    </p><br /><br />
 | 
				
			||||||
                    <input type="submit" 	name="valider"		value="Valider">
 | 
					                    <input type="submit" 	name="valider"		value="Valider">
 | 
				
			||||||
                    <input type="reset" 	name="annuler" 		value="Annuler">
 | 
					                    <input type="reset" 	name="annuler" 		value="Annuler">
 | 
				
			||||||
@@ -32,5 +36,4 @@
 | 
				
			|||||||
    </form>
 | 
					    </form>
 | 
				
			||||||
    <br /><br/>
 | 
					    <br /><br/>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
            
 | 
					</html>
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<%-- 
 | 
					<%-- 
 | 
				
			||||||
    Document   : ModifProfilJSP
 | 
					    Document   : ModifProfilJSP
 | 
				
			||||||
    Created on : 18 oct. 2021, 11:10:01
 | 
					    Created on : 18 oct. 2021, 11:10:01
 | 
				
			||||||
    Author     : Chelloug.Eliass
 | 
					    Author     : Millot.thomas
 | 
				
			||||||
--%>
 | 
					--%>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
 | 
					<%@page contentType="text/html" pageEncoding="UTF-8"%>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,3 @@
 | 
				
			|||||||
<%-- 
 | 
					 | 
				
			||||||
    Document   : authentificationJSP
 | 
					 | 
				
			||||||
    Created on : 18 oct. 2021, 11:09:26
 | 
					 | 
				
			||||||
    Author     : Chelloug.Eliass
 | 
					 | 
				
			||||||
--%>
 | 
					 | 
				
			||||||
<%@include file="jspf/enteteJSPF.jspf" %>
 | 
					 | 
				
			||||||
<div id="contenu">
 | 
					<div id="contenu">
 | 
				
			||||||
      <h2>Merci de vous identifier pour acceder aux dossiers</h2>
 | 
					      <h2>Merci de vous identifier pour acceder aux dossiers</h2>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user