Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SAE4.A02.1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maxime Gosselin
SAE4.A02.1
Commits
028e3029
Commit
028e3029
authored
2 months ago
by
Florine Lefebvre
Browse files
Options
Downloads
Patches
Plain Diff
ajout de l'authentification + début du compte.jsp (à finir)
parent
9d844d25
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
WEB-INF/src/controleur/Navigation.java
+22
-16
22 additions, 16 deletions
WEB-INF/src/controleur/Navigation.java
WEB-INF/vue/accueil.jsp
+0
-6
0 additions, 6 deletions
WEB-INF/vue/accueil.jsp
WEB-INF/vue/compte.jsp
+32
-3
32 additions, 3 deletions
WEB-INF/vue/compte.jsp
signin.html
+0
-49
0 additions, 49 deletions
signin.html
with
54 additions
and
74 deletions
WEB-INF/src/controleur/Navigation.java
+
22
−
16
View file @
028e3029
...
...
@@ -14,22 +14,28 @@ public class Navigation extends HttpServlet{
public
void
service
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
throws
ServletException
,
IOException
{
String
page
=
(
String
)
req
.
getParameter
(
"page"
);
String
vue
;
switch
(
page
){
case
"fils"
:
vue
=
"WEB-INF/vue/fils.jsp"
;
break
;
case
"signin"
:
vue
=
"WEB-INF/vue/signin.jsp"
;
break
;
case
"login"
:
vue
=
"WEB-INF/vue/login.jsp"
;
break
;
case
"compte"
:
vue
=
"WEB-INF/vue/compte.jsp"
;
break
;
default
:
vue
=
"WEB-INF/vue/accueil.jsp"
;
// vérification de l'authentification
if
(
req
.
getSession
().
getAttribute
(
"username"
)
==
null
){
resp
.
sendRedirect
(
"index.html"
);
}
else
{
switch
(
page
){
case
"fils"
:
vue
=
"WEB-INF/vue/fils.jsp"
;
break
;
case
"signin"
:
vue
=
"WEB-INF/vue/signin.jsp"
;
break
;
case
"login"
:
vue
=
"WEB-INF/vue/login.jsp"
;
break
;
case
"compte"
:
vue
=
"WEB-INF/vue/compte.jsp"
;
break
;
default
:
vue
=
"WEB-INF/vue/accueil.jsp"
;
}
req
.
getRequestDispatcher
(
vue
).
forward
(
req
,
resp
);
}
req
.
getRequestDispatcher
(
vue
).
forward
(
req
,
resp
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
WEB-INF/vue/accueil.jsp
+
0
−
6
View file @
028e3029
<%@ page
contentType=
"text/html; charset=UTF-8"
%>
<%
// vérification de l'authentification
if
(
request
.
getSession
().
getAttribute
(
"username"
)
==
null
)
response
.
sendRedirect
(
"index.html"
);
%>
<!DOCTYPE html>
<html>
<head>
...
...
This diff is collapsed.
Click to expand it.
WEB-INF/vue/compte.jsp
+
32
−
3
View file @
028e3029
<%@ page
contentType=
"text/html; charset=UTF-8"
%>
<%
// vérification de l'authentification
if
(
request
.
getSession
().
getAttribute
(
"username"
)
==
null
)
response
.
sendRedirect
(
"index.html"
);
<%@ page
import=
"modele.dao.DaoUser"
%>
<%@ page
import=
"modele.dto.User"
%>
<%!
DaoUser
daoUser
=
new
DaoUser
();
%>
<!DOCTYPE html>
...
...
@@ -62,6 +64,33 @@
Déconnexion
</a>
</div>
<div
class=
"d-flex justify-content-center mt-5"
>
<form
id=
"modifyAccountForm"
action=
""
method=
"post"
class=
"w-75"
>
<div>
<div
class=
"mb-3"
>
<p
class=
"mb-1"
>
Pseudonyme
<a
type=
"button"
data-bs-toggle=
"tooltip"
title=
"Vous ne pouvez pas changer de pseudonyme"
>
<i
class=
"bi-info-circle"
></i>
</a>
</p>
<input
class=
"form-control"
name=
"username"
type=
"text"
value=
"
<%=
session
.
getAttribute
(
"username"
)
%>
"
disabled
>
</div>
<div
class=
"mt-2 mb-3"
>
<p
class=
"mb-1"
>
Prénom
</p>
<input
class=
"form-control"
name=
"firstname"
type=
"text"
value=
"Florine"
maxlength=
"50"
>
</div>
<div
class=
"mt-2 mb-3"
>
<p
class=
"mb-1"
>
Nom de famille
</p>
<input
class=
"form-control"
name=
"lastname"
type=
"text"
value=
"Lefebvre"
maxlength=
"50"
>
</div>
</div>
<div
class=
"mt-5 d-flex flex-column justify-content-center"
>
<input
class=
"btn btn-primary flex-fill"
type=
"submit"
value=
"Mettre à jour mes informations"
>
</div>
</form>
</div>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
signin.html
deleted
100644 → 0
+
0
−
49
View file @
9d844d25
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<title>
Villeneuve Chat - Créer un compte
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"res/font.css"
rel=
"stylesheet"
>
</head>
<body>
<div
class=
"container d-flex justify-content-center flex-column"
>
<img
class=
"mx-auto mt-5"
id=
"logo"
src=
"res/villeneuve_chat_logo.jpg"
width=
"350px"
>
<h1
class=
"mx-auto fw-bold mt-3"
>
Créer un compte
</h1>
<div
class=
"mx-auto mt-1"
>
<form
id=
"loginForm"
action=
""
method=
"post"
>
<div>
<div
class=
"mt-2 mb-3"
>
<p
class=
"mb-1"
>
Pseudonyme
</p>
<input
class=
"form-control"
name=
"username"
type=
"text"
placeholder=
"pmathieu"
maxlength=
"24"
>
</div>
<div
class=
"mb-3"
>
<p
class=
"mb-1"
>
Mot de passe
</p>
<input
class=
"form-control"
name=
"password"
type=
"password"
placeholder=
"••••••••••"
>
</div>
<div
class=
"mt-2 mb-3"
>
<p
class=
"mb-1"
>
Prénom
</p>
<input
class=
"form-control"
name=
"firstname"
type=
"text"
placeholder=
"Philippe"
maxlength=
"50"
>
</div>
<div
class=
"mt-2 mb-3"
>
<p
class=
"mb-1"
>
Nom de famille
</p>
<input
class=
"form-control"
name=
"lastname"
type=
"text"
placeholder=
"Mathieu"
maxlength=
"50"
>
</div>
</div>
<div
class=
"mt-5 d-flex flex-column justify-content-center"
>
<input
class=
"btn btn-primary flex-fill"
type=
"submit"
value=
"Créer un compte"
>
<a
class=
"btn btn-link mt-2"
href=
"maquette/index.html"
>
J'ai déjà un compte
</a>
</div>
</form>
</div>
</div>
<footer
class=
"fixed-bottom"
>
<div
class=
"d-flex justify-content-between border-top p-3"
>
<span>
Villeneuve Chat
©
</span>
<span>
Florine Lefebvre
&
Maxime Gosselin
</span>
<a
href=
"res/SAe_S4_sujet_ReseauSocial.pdf"
>
Lien du sujet SAÉ
</a>
</div>
</footer>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment