Skip to content
Snippets Groups Projects
Commit aaac481a authored by Charlie Darques's avatar Charlie Darques
Browse files

modif pages de connexion/inscription

parent 11230a54
No related branches found
No related tags found
No related merge requests found
......@@ -10,13 +10,13 @@ import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
@WebServlet("/SignIn")
public class SignIn extends HttpServlet {
@WebServlet("/SignUp")
public class SignUp extends HttpServlet {
@Override
public void service(HttpServletRequest req, HttpServletResponse res) throws IOException {
PrintWriter out = res.getWriter();
UserDAO userdao = new UserDAO();
userdao.createUser(); //WIP
User user = new User(req.getParameter("login"), req.getParameter("pwd"));
if (userdao.isDatabased(user)){
out.println("<h1>Bienvenue " + user.getUserName() + " !</h1>");
......
......@@ -5,9 +5,10 @@
<title>Create Account</title>
</head>
<body>
<form action="LogIn">
<input name="login" type="text">
<input name="pwd" type="password">
<h1>Sign up</h1>
<form action="http://localhost:8080/s4a021-web-backend/SignUp" method="post">
<input name="login" type="text" placeholder="username">
<input name="pwd" type="password" placeholder="password">
<button type="submit">Create my Account</button>
</form>
</body>
......
......@@ -8,11 +8,12 @@
<title>Connexion</title>
</head>
<body>
<form action="LogIn" method="get">
<input name="login" type="text">
<input name="pwd" type="password">
<h1>Connexion</h1>
<form action="http://localhost:8080/s4a021-web-backend/LogIn" method="post">
<input name="login" type="text" placeholder="username">
<input name="pwd" type="password" placeholder="password">
<button type="submit">Connexion</button>
<a href="./create.html">Create Account</a>
<p><i>New user ? Click <a href="./create.html">here</a> to create an account</i></p>
</form>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment