+<meta charset="UTF-8">
<html>
<body>
+<meta charset="UTF-8">
<html>
<body>
Bonjour <% out.print(session.getAttribute("firstname")); %>
session.setAttribute("age", age);
session.setAttribute("work", work);
%>
-
+<meta charset="UTF-8">
<html>
<body>
<a href="nextpage.jsp">Continue</a>
<% Cookie[] cookies = request.getCookies(); %>
-
+<meta charset="UTF-8">
<html>
<body>
Bonjour <br>
--- /dev/null
+<Context path=""
+ antiResourceLocking="false" />
--- /dev/null
+package user;
+public class UserData {
+ String firstname;
+ String lastname;
+ String email;
+ Integer age;
+
+ public void setFirstname(String value) {
+ firstname = value;
+ }
+
+ public void setLastname(String value) {
+ lastname = value;
+ }
+
+ public void setEmail(String value) {
+ email = value;
+ }
+
+ public void setAge(Integer value) {
+ age = value;
+ }
+
+ public String getFirstname() {
+ return firstname;
+ }
+
+ public String getLastname() {
+ return lastname;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public Integer getAge() {
+ return age;
+ }
+
+}
--- /dev/null
+<meta charset="UTF-8">
+<html>
+<body>
+
+<form method="POST" action="saveinfos.jsp">
+ First name:<br>
+ <input type="text" name="firstname"><br>
+ Last name:<br>
+ <input type="text" name="lastname"><br>
+ Email:<br>
+ <input type="email" name="email"><br>
+ Age:<br>
+ <input type="text" name="age" size="3"><br><br>
+ <input type="submit" value="Submit">
+</form>
+
+</body>
+</html>
--- /dev/null
+<%@ page contentType="text/html" pageEncoding="UTF-8" %>
+<jsp:useBean id="user" class="user.UserData" scope="session" />
+<jsp:setProperty name="user" property="*"/>
+<meta charset="UTF-8">
+<html>
+ <body>
+ Prénom: <%= user.getFirstname() %><br>
+ Nom: <%= user.getLastname() %><br>
+ Email: <%= user.getEmail() %><br>
+ Age: <%= user.getAge() %><br>
+ </body>
+</html>