This commit is contained in:
33
web/WEB-INF/accueilJSP.jsp
Normal file
33
web/WEB-INF/accueilJSP.jsp
Normal file
@@ -0,0 +1,33 @@
|
||||
<%--
|
||||
Document : accueilJSP
|
||||
Created on : 18 oct. 2021, 10:56:46
|
||||
Author : clementine.desrucques
|
||||
--%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@page import="com.test.forms.AuthentifForm" %>
|
||||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
|
||||
<!-- Message de bienvenue personnalisé -->
|
||||
<p>Bienvenue <c:out value="${param.ztPseudo}" /></p>
|
||||
${empty param.ztPseudo ? "Veuillez vous authentifier" : "Authentification réussie"}
|
||||
<!-- Affichage du formulaire si l'utilisateur ne s'est pas encore authentifié -->
|
||||
<c:choose>
|
||||
<c:when test="${empty param.ztPseudo}">
|
||||
<fieldset>
|
||||
<legend>Authentification</legend>
|
||||
<form method="POST" action="Authentification">
|
||||
<input type="text" name="ztPseudo" placeholder="Pseudo" /><br /><!-- comment -->
|
||||
<input type="password" name="ztMDP" placeholder="Mot de passe" /><br /><br />
|
||||
<input type="submit" value="Valider" />
|
||||
</form>
|
||||
</fieldset>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<!-- Si l'utilisateur s'est authentifié,
|
||||
Affichage du message contenu dans l'objet controlForm de type AuthentifForm -->
|
||||
|
||||
<p>${controlForm.getResultat()}</p>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
<br />
|
Reference in New Issue
Block a user