<html>
<body>
-<form action="savename.jsp">
+<form action="saveinfos.jsp">
First name:<br>
<input type="text" name="firstname"><br>
Last name:<br>
- <input type="text" name="lastname"><br><br>
+ <input type="text" name="lastname"><br>
+ Address:<br>
+ <input type="text" name="address"><br>
+ Age:<br>
+ <input type="text" name="age" size="3"><br>
+ Work:<br>
+ <input type="text" name="work"><br><br>
<input type="submit" value="Submit">
</form>
<html>
<body>
- Bonjour <%= session.getAttribute("theName") %>
+ Bonjour <% out.print(session.getAttribute("firstname")); %> <% out.print(session.getAttribute("lastname")); %>, <% out.print(session.getAttribute("age")); %> years old
+ living at <% out.print(session.getAttribute("address")); %> working as <% out.print(session.getAttribute("work")); %>
</body>
</html>
--- /dev/null
+<%
+String firstname = request.getParameter("firstname");
+String lastname = request.getParameter("lastname");
+String address = request.getParameter("address");
+String age = request.getParameter("age");
+String work = request.getParameter("work");
+session.setAttribute("firstname", firstname);
+session.setAttribute("lastname", lastname);
+session.setAttribute("address", address);
+session.setAttribute("age", age);
+session.setAttribute("work", work);
+%>
+
+<html>
+ <body>
+ <a href="nextpage.jsp">Continue</a>
+ </body>
+</html>
+++ /dev/null
-<%
-String firstname = request.getParameter("firstname");
-String lastname = request.getParameter("lastname");
-session.setAttribute("theName", firstname + " " + lastname);
-%>
-
-<html>
- <body>
- <a href="nextpage.jsp">Continue</a>
- </body>
-</html>