diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..cb83cd3aac3d2d1bc348fbfc9e73b86a15aee922 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,12 @@ +{ + "java.project.sourcePaths": [ + "WEB-INF/classes", + "WEB-INF/lib" + ], + "java.project.referencedLibraries": [ + "/home/infoetu/alexandre.dehaine.etu/tomcat/lib/annotations-api.jar", + "/home/infoetu/alexandre.dehaine.etu/tomcat/webapps/sae-r4.01/WEB-INF/lib/postgresql-42.7.4.jar", + "/home/infoetu/alexandre.dehaine.etu/tomcat/webapps/sae-r4.01/WEB-INF/lib/chesslib-1.1.8.jar" + ], + "java.project.outputPath": "WEB-INF/classes" +} \ No newline at end of file diff --git a/ScriptSQL.sql b/ScriptSQL.sql index 7a19a729218732df96434da77e1c5cf7cc529867..6473068125198f4a8a33da9ff11bededca482d4a 100644 --- a/ScriptSQL.sql +++ b/ScriptSQL.sql @@ -14,6 +14,7 @@ CREATE TABLE Conversations nomConv VARCHAR, createur VARCHAR, dateCrea DATE default CURRENT_DATE, + pwd VARCHAR, CONSTRAINT pk_Conversations PRIMARY KEY (idConv), CONSTRAINT fk_Utilisateur FOREIGN KEY (createur) REFERENCES Utilisateur(email) @@ -35,19 +36,19 @@ CREATE TABLE Messages -- Création des utilisateur INSERT INTO Utilisateur(pseudo, email, pwd) - VALUES('Alex2n','alexandre.dehaine.etu@univ-lille.fr', 'mdp'); + VALUES('Alex2n','alexandre.dehaine.etu@univ-lille.fr', MD5('mdp')); INSERT INTO Utilisateur(pseudo, email, pwd) - VALUES('Shiira02','audrey.v.etu@univ-lille.fr', 'mdp'); + VALUES('Shiira02','audrey.v.etu@univ-lille.fr', MD5('mdp')); -- Créations d'une Conversation 1 et de messages - INSERT INTO Conversations(nomConv, createur) - VALUES('Conversation 1', (SELECT email FROM Utilisateur WHERE email = 'audrey.v.etu@univ-lille.fr')); + INSERT INTO Conversations(nomConv, createur, pwd) + VALUES('Conversation 1', (SELECT email FROM Utilisateur WHERE email = 'audrey.v.etu@univ-lille.fr'), MD5('mdp')); INSERT INTO Messages(message, utilisateur, idConv) VALUES('Salut', (SELECT email FROM Utilisateur WHERE email = 'alexandre.dehaine.etu@univ-lille.fr'), (SELECT idConv FROM Conversations WHERE nomConv = 'Conversation 1')); INSERT INTO Messages(message, utilisateur, idConv) VALUES('Hello', (SELECT email FROM Utilisateur WHERE email = 'audrey.v.etu@univ-lille.fr'), (SELECT idConv FROM Conversations WHERE nomConv = 'Conversation 1')); -- Créations d'une Conversation 2 et de messages INSERT INTO Conversations(nomConv, createur) - VALUES('Conversation 2', (SELECT email FROM Utilisateur WHERE email = 'alexandre.dehaine.etu@univ-lille.fr')); + VALUES('Conversation 2', (SELECT email FROM Utilisateur WHERE email = 'alexandre.dehaine.etu@univ-lille.fr'), MD5('mdp')); INSERT INTO Messages(message, utilisateur, idConv) VALUES('Conv 2', (SELECT email FROM Utilisateur WHERE email = 'alexandre.dehaine.etu@univ-lille.fr'), (SELECT idConv FROM Conversations WHERE nomConv = 'Conversation 2')); INSERT INTO Messages(message, utilisateur, idConv) diff --git a/WEB-INF/classes/dao/Authent.class b/WEB-INF/classes/dao/Authent.class new file mode 100644 index 0000000000000000000000000000000000000000..45f9b26835e582c2d87ceccc95684c00e0a47a53 Binary files /dev/null and b/WEB-INF/classes/dao/Authent.class differ diff --git a/WEB-INF/classes/dao/Conversation.class b/WEB-INF/classes/dao/Conversation.class index 371c092f728d39d0d6c485973e5fd70d04b310f4..c46de39582b4f87e4f4f07e3b12905ad7290e591 100644 Binary files a/WEB-INF/classes/dao/Conversation.class and b/WEB-INF/classes/dao/Conversation.class differ diff --git a/WEB-INF/classes/dao/ConversationDao.class b/WEB-INF/classes/dao/ConversationDao.class index 9f49a0f6e0117fa17fa6eab5fa2f8874b9847139..a2930172d2374868a20253fe952d727e48f96892 100644 Binary files a/WEB-INF/classes/dao/ConversationDao.class and b/WEB-INF/classes/dao/ConversationDao.class differ diff --git a/WEB-INF/classes/dao/ConversationJdbcDao.class b/WEB-INF/classes/dao/ConversationJdbcDao.class index d12c821c417bc2040428c62041dc7de3593f5a69..21c0c2d04aa20f9680699cd709e95b6cc96324ec 100644 Binary files a/WEB-INF/classes/dao/ConversationJdbcDao.class and b/WEB-INF/classes/dao/ConversationJdbcDao.class differ diff --git a/WEB-INF/classes/dao/Message.class b/WEB-INF/classes/dao/Message.class index 7c7ecb66901903a3355227369aec6d02561d6767..74e4b4ebc05748592bbb9752c0cea2ea666b44f4 100644 Binary files a/WEB-INF/classes/dao/Message.class and b/WEB-INF/classes/dao/Message.class differ diff --git a/WEB-INF/classes/dao/MessageJdbcDao.class b/WEB-INF/classes/dao/MessageJdbcDao.class index 351df4f3a66ea2b41e6fc91905ccf6d72d6fe751..bcce12db5395236b73f4b1af3e128f3c3d2509ac 100644 Binary files a/WEB-INF/classes/dao/MessageJdbcDao.class and b/WEB-INF/classes/dao/MessageJdbcDao.class differ diff --git a/WEB-INF/classes/dao/Utilisateur.class b/WEB-INF/classes/dao/Utilisateur.class index 676b01c2eedc15fa3fb762645030bf4f33c4a807..0c1a37ae55d3f5140bbf1bb8ce204d519e6f4a67 100644 Binary files a/WEB-INF/classes/dao/Utilisateur.class and b/WEB-INF/classes/dao/Utilisateur.class differ diff --git a/WEB-INF/src/dao/Authent.java b/WEB-INF/src/dao/Authent.java new file mode 100644 index 0000000000000000000000000000000000000000..2ab890eba9e71b7ab85d02554b48e3da6181e179 --- /dev/null +++ b/WEB-INF/src/dao/Authent.java @@ -0,0 +1,84 @@ +package dao; +import java.io.*; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; + +import jakarta.servlet.*; +import jakarta.servlet.http.*; +import jakarta.servlet.annotation.WebServlet; + +@WebServlet("/Authent") +public class Authent extends HttpServlet { + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String loginSession = req.getParameter("email"); + String mdpSession = req.getParameter("pwd"); + + try (Connection con = getCon(); Statement stmt = con.createStatement()) { + String action = req.getParameter("action"); + if(action.equals("login")){ + String sql = "SELECT count(*) FROM Utilisateur WHERE email = '"+ loginSession +"' AND pwd = MD5('"+mdpSession+"');"; + System.err.println(sql); + ResultSet rs = stmt.executeQuery(sql); + res.setContentType("text/html;charset=UTF-8"); + PrintWriter out = res.getWriter(); + out.println("<head><title>Autent</title>"); + out.println("<META content=\"charset=UTF-8\"></head><body>"); + if(rs.next() && rs.getInt(1) == 1){ + HttpSession session = req.getSession(); + out.println("<p>Connecté</p>"); + session.setAttribute("token", loginSession); + res.sendRedirect("accueil.jsp"); + + }else{ + res.sendRedirect("login.html"); + } + out.println("</body>"); + con.close(); + }else if(action.equals("creer")){ + String sql = "INSERT INTO Utilisateur(pseudo, email, pwd) VALUES('"+ + req.getParameter("pseudo")+"',"+ + "'"+req.getParameter("email")+"',"+ + "MD5('"+req.getParameter("pwd")+"')"+ + ");"; + System.err.println(sql); + try{ + stmt.executeUpdate(sql); + con.close(); + res.sendRedirect("login.html"); + }catch (SQLException e){ + con.close(); + res.sendRedirect("login.html"); + } + } + } catch (SQLException e) { + System.out.println("Erreur lors de l'accès à la base de données : " + e.getMessage()); + e.printStackTrace(); + } + } + + public Connection getCon() { + + try { + + String driver = "org.postgresql.Driver"; + String url = "jdbc:postgresql://psqlserv/but2"; + String nom = "alexandredehaineetu"; + String mdp = "moi"; + + Class.forName(driver); + Connection connection = DriverManager.getConnection(url, nom, mdp); + return connection; + + } catch (Exception e) { + System.out.println(e.getMessage()); + } + + return null; + + } +} \ No newline at end of file diff --git a/WEB-INF/src/dao/Conversation.java b/WEB-INF/src/dao/Conversation.java index 8afd07ea88d88c05f0aa20220375c7a8ac1caa09..779bc793b10a9a2e813a1507cc98956dd32e0aaa 100644 --- a/WEB-INF/src/dao/Conversation.java +++ b/WEB-INF/src/dao/Conversation.java @@ -7,8 +7,9 @@ public class Conversation { private LocalDate dateCrea; private String nomConv; private Utilisateur createur; + private String pwd; - public Conversation(int idConv, String nomConv, Utilisateur createur, LocalDate dateCrea) { + public Conversation(int idConv, String nomConv, Utilisateur createur, LocalDate dateCrea, String pwd) { this.idConv = idConv; this.dateCrea = dateCrea; this.nomConv = nomConv; @@ -29,5 +30,55 @@ public class Conversation { public void setNomConv(String nomConv) { this.nomConv = nomConv; } + @Override + public String toString() { + return "Conversation [idConv=" + idConv + ", dateCrea=" + dateCrea + ", nomConv=" + nomConv + ", createur=" + + createur + ", pwd=" + pwd + "]"; + } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + idConv; + result = prime * result + ((dateCrea == null) ? 0 : dateCrea.hashCode()); + result = prime * result + ((nomConv == null) ? 0 : nomConv.hashCode()); + result = prime * result + ((createur == null) ? 0 : createur.hashCode()); + result = prime * result + ((pwd == null) ? 0 : pwd.hashCode()); + return result; + } + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Conversation other = (Conversation) obj; + if (idConv != other.idConv) + return false; + if (dateCrea == null) { + if (other.dateCrea != null) + return false; + } else if (!dateCrea.equals(other.dateCrea)) + return false; + if (nomConv == null) { + if (other.nomConv != null) + return false; + } else if (!nomConv.equals(other.nomConv)) + return false; + if (createur == null) { + if (other.createur != null) + return false; + } else if (!createur.equals(other.createur)) + return false; + if (pwd == null) { + if (other.pwd != null) + return false; + } else if (!pwd.equals(other.pwd)) + return false; + return true; + } + } diff --git a/WEB-INF/src/dao/ConversationDao.java b/WEB-INF/src/dao/ConversationDao.java index d62cbeeebcffe77a77128bbd645b3ca78ce5d89f..9f61d27a79ab593f6b9e53ea68c21170bdea1300 100644 --- a/WEB-INF/src/dao/ConversationDao.java +++ b/WEB-INF/src/dao/ConversationDao.java @@ -7,6 +7,7 @@ public interface ConversationDao { List<Message> findAllMessages(int idConv); List<Utilisateur> findAllUtilisateurs(int idConv); List<Conversation> findByUser(String email); - boolean createConversation(String nomConv, Utilisateur createur); + boolean createConversation(String nomConv, Utilisateur createur, String pwd); boolean deleteConversation(int idConv); + boolean goodPwd(int idConv, String pwd); } diff --git a/WEB-INF/src/dao/ConversationJdbcDao.java b/WEB-INF/src/dao/ConversationJdbcDao.java index 2e96f1a5491bfd0b95acd889e609012146078b3b..d3897c291e609ad739961c868a55b165b2697175 100644 --- a/WEB-INF/src/dao/ConversationJdbcDao.java +++ b/WEB-INF/src/dao/ConversationJdbcDao.java @@ -19,15 +19,16 @@ public class ConversationJdbcDao implements ConversationDao{ System.err.println(sql); ResultSet rs = stmt.executeQuery(sql); rs.next(); - Conversation conversation = new Conversation(rs.getInt(1), rs.getString(2), jdbcUser.findByEmail(rs.getString(3)), rs.getDate(4).toLocalDate()); + Conversation conversation = new Conversation(rs.getInt(1), rs.getString(2), jdbcUser.findByEmail(rs.getString(3)), rs.getDate(4).toLocalDate(), rs.getString(5)); rs.close(); con.close(); + return conversation; }catch (SQLException e) { System.out.println("Erreur lors de l'accès à la base de données : " + e.getMessage()); e.printStackTrace(); } - return new Conversation(0, "err", new Utilisateur("err","err" , "err"),LocalDate.now()); + return new Conversation(0, "err", new Utilisateur("err","err" , "err"),LocalDate.now(), "err"); } @Override @@ -93,9 +94,9 @@ public class ConversationJdbcDao implements ConversationDao{ } @Override - public boolean createConversation(String nomConv, Utilisateur createur) { + public boolean createConversation(String nomConv, Utilisateur createur, String pwd) { try (Connection con = getCon(); Statement stmt = con.createStatement()) { - String sql = "INSERT INTO Conversations(nomConv, createur) VALUES('"+nomConv+"', '"+createur.getEmail()+"');"; + String sql = "INSERT INTO Conversations(nomConv, createur, pwd) VALUES('"+nomConv+"', '"+createur.getEmail()+"', MD5('"+pwd+"'));"; System.err.println(sql); ResultSet rs = stmt.executeQuery(sql); rs.next(); @@ -145,5 +146,22 @@ public class ConversationJdbcDao implements ConversationDao{ return null; } + + @Override + public boolean goodPwd(int idConv, String pwd) { + try (Connection con = getCon(); Statement stmt = con.createStatement()) { + String sql = "SELECT * FROM Conversations WHERE idConv = "+ idConv +" AND pwd = MD5('"+pwd+"');"; + System.err.println(sql); + ResultSet rs = stmt.executeQuery(sql); + rs.next(); + rs.close(); + con.close(); + return true; + }catch (SQLException e) { + System.out.println("Erreur lors de l'accès à la base de données : " + e.getMessage()); + e.printStackTrace(); + } + return false; + } } diff --git a/WEB-INF/src/dao/Message.java b/WEB-INF/src/dao/Message.java index d3f2676aacb38a59b665ea788698653185a51b4d..269fb61a821ab60351784bd035081757d174dfe0 100644 --- a/WEB-INF/src/dao/Message.java +++ b/WEB-INF/src/dao/Message.java @@ -20,7 +20,7 @@ public class Message { } @Override public String toString(){ - return "Email : " + utilisateur + " Date : " + jour + " Heure : " + heure + " Message : " + message; + return "<span style=\"font-style: italic;\">"+heure+"</span> " + utilisateur.getPseudo() + " : " + message; } public int getIdMessage() { diff --git a/WEB-INF/src/dao/Utilisateur.java b/WEB-INF/src/dao/Utilisateur.java index 72d4e5ecd34e8750bf222041f5c0a5489855c068..2894834ec33c181a404e2d53b48551400dd7d7f9 100644 --- a/WEB-INF/src/dao/Utilisateur.java +++ b/WEB-INF/src/dao/Utilisateur.java @@ -19,6 +19,43 @@ public class Utilisateur { return pseudo; } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((pseudo == null) ? 0 : pseudo.hashCode()); + result = prime * result + ((email == null) ? 0 : email.hashCode()); + result = prime * result + ((pwd == null) ? 0 : pwd.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Utilisateur other = (Utilisateur) obj; + if (pseudo == null) { + if (other.pseudo != null) + return false; + } else if (!pseudo.equals(other.pseudo)) + return false; + if (email == null) { + if (other.email != null) + return false; + } else if (!email.equals(other.email)) + return false; + if (pwd == null) { + if (other.pwd != null) + return false; + } else if (!pwd.equals(other.pwd)) + return false; + return true; + } + public String getEmail() { return email; } diff --git a/accueil.jsp b/accueil.jsp index dd9cdb35b4a64860ee12e6cd1a4f90acd03cba5f..8729b9cdf68c6a1b680c04aceadfb835673ef888 100644 --- a/accueil.jsp +++ b/accueil.jsp @@ -1,65 +1,123 @@ <%@ page pageEncoding="UTF-8" %> <%@ page import="dao.*" %> <%@ page import="java.util.List" %> +<%@ page import="java.sql.*" %> <%@ page import="jakarta.servlet.*" %> <!DOCTYPE html> <html> <head> <title> Accueil </title> - <%-- <% response.setIntHeader("Refresh", 5); %> --%> + <% response.setIntHeader("Refresh", 5); %> </head> <body> <% - UtilisateurJdbcDao jdbcUser = new UtilisateurJdbcDao(); - Utilisateur utilisateur= jdbcUser.findByEmail("alexandre.dehaine.etu@univ-lille.fr"); - out.println(utilisateur); - - ConversationJdbcDao jdbcConv = new ConversationJdbcDao(); - List<Conversation> conv = jdbcConv.findByUser(utilisateur.getEmail()); + String UserEmail = (String) session.getAttribute("token"); + if (UserEmail == null || UserEmail.isEmpty() || UserEmail == "err") { + out.println("null"); + response.sendRedirect("login.html"); + } + UtilisateurJdbcDao jdbcUser = new UtilisateurJdbcDao(); + Utilisateur utilisateur = jdbcUser.findByEmail(UserEmail); + out.println(utilisateur); + ConversationJdbcDao jdbcConv = new ConversationJdbcDao(); + List<Conversation> conv = jdbcConv.findByUser(utilisateur.getEmail()); + String stringConv = request.getParameter("idConv"); + int selectedConvId; + try { + selectedConvId = Integer.parseInt(stringConv); + } catch (NumberFormatException e) { + selectedConvId = 0; + } + MessageJdbcDao jdbcMessage = new MessageJdbcDao(); + if(request.getParameter("Message") != null && selectedConvId != 0){ + if(request.getParameter("pwd") == null){ + jdbcMessage.createMessage(utilisateur, request.getParameter("Message"), selectedConvId); + response.sendRedirect("http://localhost:8080/sae-r4.01/accueil.jsp?idConv=" + selectedConvId); + }else if(jdbcConv.goodPwd(selectedConvId, request.getParameter("pwd"))){ + jdbcMessage.createMessage(utilisateur, request.getParameter("Message"), selectedConvId); + response.sendRedirect("http://localhost:8080/sae-r4.01/accueil.jsp?idConv=" + selectedConvId); + } + } + if(request.getParameter("param") == "create"){ + jdbcConv.createConversation(request.getParameter("nomConv") ,utilisateur, request.getParameter("pwd")); + jdbcMessage.createMessage(utilisateur, request.getParameter("Message"), selectedConvId); + response.sendRedirect("http://localhost:8080/sae-r4.01/accueil.jsp?idConv=" + selectedConvId); + } + %> - %> - <br> - <style> + <br> + <style> table, th, td { - border: 1px solid black; + border: 1px solid black; } - </style> - <table> - <tr> - <th>idConv</th> - <th>nomConv</th> - <th>createur</th> - <th>dateCrea</th> - </tr> - <% for (int i = 0; i < conv.size(); i++){ + </style> + <br> + <table> + <tr> + <th>Identifiant</th> + <th>Nom</th> + <th>Createur</th> + <th>Date de création</th> + </tr> + <% + if(conv.size()==0){ + out.println("<tr> <td colspan=\"4\">Aucune conversation rejointe</td></tr>"); + }else{ + for (int i = 0; i < conv.size(); i++) { out.println("<tr>"); out.println("<td>" + conv.get(i).getIdConv() + "</td>"); - out.println("<td>" + conv.get(i).getNomConv() + "</td>"); - out.println("<td>" + conv.get(i).getCreateur() + "</td>"); + out.println("<td> <a href=http://localhost:8080/sae-r4.01/accueil.jsp?idConv="+conv.get(i).getIdConv()+">"+conv.get(i).getNomConv() + "</a></td>"); + out.println("<td>" + conv.get(i).getCreateur().getPseudo() + "</td>"); out.println("<td>" + conv.get(i).getDateCrea() + "</td>"); out.println("</tr>"); } - - String stringConv = request.getParameter("idConv"); - int selectedConvId; - try{ - selectedConvId = Integer.parseInt(stringConv); - } catch (NumberFormatException e){ - selectedConvId = 0; - } - out.println(selectedConvId); + } + %> + </table> - List<Message> selectedConv = jdbcConv.findAllMessages(selectedConvId); - for(int i =0; i < selectedConv.size();i++){ - out.println(selectedConv.get(i) + "<br>"); - } + <% + if (selectedConvId > 0 && conv.contains(jdbcConv.findById(selectedConvId))) { + List<Message> selectedConv = jdbcConv.findAllMessages(selectedConvId); + out.println("<h3>Messages de la conversation :</h3>"); + for (int i = 0; i < selectedConv.size(); i++) { + out.println(selectedConv.get(i) + "<br>"); + } + out.println("<form action='accueil.jsp' method='POST'>"); + out.println("<label for=\"Message\">Message:</label>"); + out.println("<input type=\"text\" id=\"Message\" name=\"Message\" onfocus=\"this.select()\">"); + out.println("<button type=\"submit\" name=\"idConv\" value=\""+stringConv+"\" class=\"btn btn-primary\">Envoyer</button>"); + out.println("</form>"); + } else { + out.println("<p>Aucune conversation sélectionnée.</p>"); + } + %> + <h3>Rejoindre une conversation :</h3> + <% + out.println("<form action='accueil.jsp' method='POST'>"); + out.println("<label for=\"idConv,\">Identifiant de la conversation:</label>"); + out.println("<input type=\"text\" id=\"idConv\" name=\"idConv\">"); + out.println("<label for=\"pwd\">Mot de passe:</label>"); + out.println("<input type=\"text\" id=\"pwd\" name=\"pwd\">"); + out.println("<label for=\"Message\">Message:</label>"); + out.println("<input type=\"text\" id=\"Message\" name=\"Message\">"); + out.println("<button type=\"submit\" name=\"param\" value = \"join\" class=\"btn btn-primary\">Rejoindre</button>"); + out.println("</form>"); + %> - %> - </table> - + <h3>Créer une conversation :</h3> + <% + out.println("<label for=\"nomConv\">Nom de la conversation:</label>"); + out.println("<input type=\"text\" id=\"nomConv\" name=\"nomConv\">"); + out.println("<label for=\"pwd\">Mot de passe:</label>"); + out.println("<input type=\"text\" id=\"pwd\" name=\"pwd\">"); + out.println("<label for=\"Message\">Message:</label>"); + out.println("<input type=\"text\" id=\"Message\" name=\"Message\">"); + out.println("<button type=\"submit\" name=\"param\" value = \"create\" class=\"btn btn-primary\">Créer</button>"); + out.println("</form>"); + %> </body> diff --git a/login.html b/login.html new file mode 100644 index 0000000000000000000000000000000000000000..c4d1f975ebec8519b7c02b425e536fafddd9af2e --- /dev/null +++ b/login.html @@ -0,0 +1,33 @@ +<!doctype html> +<html lang="fr"> + +<head> + <meta charset="utf-8"> + <title>Log In</title> +</head> + +<BODY> + <div> + <form method='get' action='Authent'> + <label for="email">Email:</label> + <input type="text" id="email" name="email"> + <br> + <label for="pwd">Mot de passe:</label> + <input type="password" id="pwd" name="pwd"> + <button type="submit" name="action" value="login">Se connecter</button> + </form> + <br><br><br> + <form method='get' action='Authent'> + <label for="pseudo">Pseudo :</label> + <input type="text" id="pseudo" name="pseudo"> + <br> + <label for="pwd">Mot de passe :</label> + <input type="password" id="pwd" name="pwd"> + <br> + <label for="email">Email :</label> + <input type="text" id="email" name="email"> + <br> + <button type="submit" name="action" value="creer">Créer le compte</button> + </form> +</BODY> +</HTML> \ No newline at end of file diff --git a/util.txt b/util.txt index 40168bca7e2d42643db7c8cdf3d717eb091bbb2e..993006c3ea2b7fa53e4f57393fc839f00c24aeee 100644 --- a/util.txt +++ b/util.txt @@ -1,4 +1,4 @@ -Url d'appel : http://localhost:8080/sae-r4.01/monobjet.jsp +Url d'appel : http://localhost:8080/sae-r4.01/accueil.jsp Pour compiler : dans rep src :