From 4d35a01a2abbdd72d3a8ccbe64266dee9d244ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luc=C3=A0s?= Date: Wed, 17 Apr 2024 19:09:26 +0200 Subject: [PATCH] feat(DevWeb): Create profile page --- .../project/web/servlet/ProfileServlet.java | 29 ++++++++++ .../src/main/webapp/WEB-INF/pages/profile.jsp | 55 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 S2/DevWeb/Projet/src/main/java/uppa/project/web/servlet/ProfileServlet.java create mode 100644 S2/DevWeb/Projet/src/main/webapp/WEB-INF/pages/profile.jsp diff --git a/S2/DevWeb/Projet/src/main/java/uppa/project/web/servlet/ProfileServlet.java b/S2/DevWeb/Projet/src/main/java/uppa/project/web/servlet/ProfileServlet.java new file mode 100644 index 0000000..59784c3 --- /dev/null +++ b/S2/DevWeb/Projet/src/main/java/uppa/project/web/servlet/ProfileServlet.java @@ -0,0 +1,29 @@ +/* + * LoginServlet.java, 20/03/2024 + * UPPA M1 TI 2023-2024 + * Pas de copyright, aucun droits + */ + +package uppa.project.web.servlet; + +import jakarta.servlet.ServletException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.io.IOException; + +@WebServlet(name = "profileServlet", value = "/profile") +public class ProfileServlet extends HttpServlet { + + public void init() { + } + + public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { +// request.setAttribute("current", "profile"); + request.getRequestDispatcher("/WEB-INF/pages/profile.jsp").forward(request, response); + } + + public void destroy() { + } +} diff --git a/S2/DevWeb/Projet/src/main/webapp/WEB-INF/pages/profile.jsp b/S2/DevWeb/Projet/src/main/webapp/WEB-INF/pages/profile.jsp new file mode 100644 index 0000000..2432143 --- /dev/null +++ b/S2/DevWeb/Projet/src/main/webapp/WEB-INF/pages/profile.jsp @@ -0,0 +1,55 @@ +<%@ page import="uppa.project.database.pojo.User" %> +<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%@taglib prefix="layout" tagdir="/WEB-INF/tags/layouts" %> +<%@taglib prefix="component" tagdir="/WEB-INF/tags/components" %> +<%@taglib prefix="form" tagdir="/WEB-INF/tags/forms" %> + +<% + User user = (User) session.getAttribute("user"); +%> + + + Profil + +
+
+
+
+
+
+
+
+
+
+
+
+ +<%----%> +<%----%> +<%----%> +<%-- Cards Rush--%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%-- --%> +<%----%> +<%----%> +<%--<%@include file="../components/navbar.jsp" %>--%> +<%--
--%> +<%--
--%> +<%--

Cards Rush!

--%> +<%--
--%> +<%-- --%> +<%-- --%> +<%--
--%> +<%--
--%> +<%-- <%@include file="../components/new-game.jsp" %>--%> +<%-- <%@include file="../components/statistics.jsp" %>--%> +<%--
--%> +<%----%> +<%----%>