This commit is contained in:
17
web/WEB-INF/ChefCaserneJSP.jsp
Normal file
17
web/WEB-INF/ChefCaserneJSP.jsp
Normal file
@@ -0,0 +1,17 @@
|
||||
<%--
|
||||
Document : ChefCaserneJSP
|
||||
Created on : 18 oct. 2021, 11:04:13
|
||||
Author : funcha.ahamadi
|
||||
--%>
|
||||
|
||||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Chef de caserne</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World!</h1>
|
||||
</body>
|
||||
</html>
|
17
web/WEB-INF/PompierJSP.jsp
Normal file
17
web/WEB-INF/PompierJSP.jsp
Normal file
@@ -0,0 +1,17 @@
|
||||
<%--
|
||||
Document : PompierJSP
|
||||
Created on : 18 oct. 2021, 11:01:21
|
||||
Author : funcha.ahamadi
|
||||
--%>
|
||||
|
||||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>JSP Page</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World!</h1>
|
||||
</body>
|
||||
</html>
|
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}" /> sur la nouvelle application de gestion des clients</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="Accueil">
|
||||
<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 />
|
24
web/WEB-INF/web.xml
Normal file
24
web/WEB-INF/web.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
|
||||
<servlet>
|
||||
<servlet-name>PompierServlet</servlet-name>
|
||||
<servlet-class>com.test.servlets.PompierServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>ChefCaserneServlet</servlet-name>
|
||||
<servlet-class>com.test.servlets.ChefCaserneServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>PompierServlet</servlet-name>
|
||||
<url-pattern>/PompierServlet</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ChefCaserneServlet</servlet-name>
|
||||
<url-pattern>/ChefCaserneServlet</url-pattern>
|
||||
</servlet-mapping>
|
||||
<session-config>
|
||||
<session-timeout>
|
||||
30
|
||||
</session-timeout>
|
||||
</session-config>
|
||||
</web-app>
|
Reference in New Issue
Block a user