1er commit

This commit is contained in:
ines
2025-01-09 21:29:22 +01:00
commit 7ae77d8766
43 changed files with 3654 additions and 0 deletions

2
web/META-INF/context.xml Normal file
View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/appli3"/>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SDIS29</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

View File

@@ -0,0 +1,3 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
</body>
</html>

View File

@@ -0,0 +1,19 @@
<body class="bg-light">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="AccueilPompier">SDIS29</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="Profil">Consulter le Profil</a>
</li>
<li class="nav-item">
<a class="nav-link" href="EditionProfil"><3E>diter le Profil</a>
</li>
</ul>
</div>
</div>
</nav>

View File

@@ -0,0 +1,38 @@
<jsp:include page="../shared/EnteteJSP.jsp" />
<jsp:include page="../shared/NavigationJSP.jsp"/>
<div class="container mt-5">
<div class="row">
<div class="col-md-4">
<div class="card mb-4">
<img src="https://via.placeholder.com/150" class="card-img-top">
<div class="card-body">
<h5 class="card-title">Card 1</h5>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero.</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-4">
<img src="https://via.placeholder.com/150" class="card-img-top" >
<div class="card-body">
<h5 class="card-title">Card 2</h5>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero.</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-4">
<img src="https://via.placeholder.com/150" class="card-img-top" >
<div class="card-body">
<h5 class="card-title">Card 3</h5>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero.</p>
</div>
</div>
</div>
</div>
</div>
</body>
<jsp:include page="../shared/FooterJSP.jsp" />

View File

@@ -0,0 +1,12 @@
<%@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>

View File

@@ -0,0 +1,25 @@
<jsp:include page="../shared/EnteteJSP.jsp" />
<body class="p-3 mb-2 bg-light.bg-gradient text-dark" style="background: linear-gradient(135deg, #ffffff, #b0b0b0); min-height: 100vh; display: flex; justify-content: center; align-items: center; margin: 0;">
<div class="card p-4" style="max-width: 400px; width: 100%; border-radius: 10px;">
<h2 class="text-center mb-4">Connexion</h2>
<form action="authentification" method="post">
<div class="mb-3">
<label for="username" class="form-label">Nom d'utilisateur</label>
<input type="text" class="form-control" id="username" name="username" placeholder="Entrez votre nom d'utilisateur" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Mot de passe</label>
<input type="password" class="form-control" id="password" name="password" placeholder="Entrez votre mot de passe" required>
</div>
<c:if test="${not empty message}">
<div class="message">
${message}
</div>
</c:if>
<button class="btn btn-outline-secondary w-100" type="submit">Se connecter</button>
</form>
</div>
<jsp:include page="../shared/FooterJSP.jsp" />
</html>

View File

@@ -0,0 +1,50 @@
<jsp:include page="../shared/EnteteJSP.jsp" />
<jsp:include page="../shared/NavigationJSP.jsp"/>
<body class="bg-light">
<div class="container mt-5">
<h1 class="text-center">Modifier le profil</h1>
<form action="EditionProfil" method="Post">
<div class="mb-3">
<label for="nom" class="form-label">Nom</label>
<input type="text" class="form-control" id="nom" name="nom" placeholder="${pompier.nom}" value="${pompier.nom}" required>
</div>
<div class="mb-3">
<label for="prenom" class="form-label">Pr<50>nom</label>
<input type="text" class="form-control" id="prenom" name="prenom" placeholder="${pompier.prenom}" value="${pompier.prenom}" required>
</div>
<div class="mb-3">
<label for="login" class="form-label">Login</label>
<input type="text" class="form-control" id="login" name="login" placeholder="${pompier.login}" value="${pompier.login}" required>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" class="form-control" id="email" name="mail" placeholder="${pompier.mail}" value="${pompier.mail}" required>
</div>
<div class="mb-3">
<label for="adresse" class="form-label">Adresse</label>
<input type="text" class="form-control" id="adresse" name="adresse" placeholder="${pompier.adresse}" value="${pompier.adresse}" required>
</div>
<div class="mb-3">
<label for="cp" class="form-label">Code Postal</label>
<input type="text" class="form-control" id="cp" name="cp" placeholder="${pompier.cp}" value="${pompier.cp}" required>
</div>
<div class="mb-3">
<label for="ville" class="form-label">Ville</label>
<input type="text" class="form-control" id="ville" name="ville" placeholder="${pompier.ville}" value="${pompier.ville}" required>
</div>
<div class="mb-3">
<label for="bip" class="form-label">BIP</label>
<input type="text" class="form-control" id="bip" name="bip" placeholder="${pompier.bip}" value="${pompier.bip}" required>
</div>
<div class="mb-3">
<label for="grade" class="form-label">Grade</label>
<input type="number" class="form-control" id="grade" name="grade" placeholder="${pompier.grade}" value="${pompier.grade}" required>
</div>
<button type="submit" class="btn btn-primary">Enregistrer les modifications</button>
</form>
</div>
</body>
<jsp:include page="../shared/FooterJSP.jsp" />

View File

@@ -0,0 +1,29 @@
<jsp:include page="../shared/EnteteJSP.jsp" />
<jsp:include page="../shared/NavigationJSP.jsp"/>
<div class="container mt-5">
<h1 class="text-center">Informations du Pompier</h1>
<table class="table table-bordered table-striped">
<tr>
<th>ID</th>
<td>${pompier.idPompier}</td>
</tr>
<tr>
<th>Nom</th>
<td>${pompier.nom}</td>
</tr>
<tr>
<th>Pr<50>nom</th>
<td>${pompier.prenom}</td>
</tr>
<tr>
<th>Login</th>
<td>${pompier.login}</td>
</tr>
<tr>
<th>Adresse</th>
<td>${pompier.adresse}, ${pompier.ville}, ${pompier.cp} </td>
</tr>
</table>
</div>
<jsp:include page="../shared/FooterJSP.jsp" />

27
web/WEB-INF/web.xml Normal file
View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="6.0" xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd">
<servlet>
<servlet-name>AuthentificationServlet</servlet-name>
<servlet-class>Servlet.AuthentificationServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>ProfilPompierServlet</servlet-name>
<servlet-class>Servlet.ProfilPompierServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>EditionProfilServlet</servlet-name>
<servlet-class>Servlet.EditionProfilServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AuthentificationServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ProfilPompierServlet</servlet-name>
<url-pattern>/Profil</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>EditionProfilServlet</servlet-name>
<url-pattern>/EditionProfil</url-pattern>
</servlet-mapping>
</web-app>

BIN
web/img/logo-sdis.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
web/img/pompier.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

15
web/index.html Normal file
View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<!--
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/Html.html to edit this template
-->
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div>TODO write content</div>
</body>
</html>

39
web/ressources/mycss.css Normal file
View File

@@ -0,0 +1,39 @@
body {
background: linear-gradient(135deg, #667eea, #764ba2);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
}
.auth-form {
background: #fff;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
padding: 30px;
max-width: 400px;
width: 100%;
}
.auth-form h2 {
text-align: center;
margin-bottom: 20px;
color: #333;
}
.auth-form .btn-primary {
background: #667eea;
border-color: #667eea;
}
.auth-form .btn-primary:hover {
background: #5a67d8;
}
.form-footer {
text-align: center;
margin-top: 15px;
}
.form-footer a {
text-decoration: none;
color: #667eea;
}
.form-footer a:hover {
text-decoration: underline;
}