exo10: add a FIXME comment.
[TD_webapps.git] / ROOT / exo7 / setcookie.jsp
1 <%@ page import="java.io.*, java.util.*, javax.servlet.*" %>
2 <%
3 request.setCharacterEncoding("UTF-8");
4 String firstname = request.getParameter("firstname");
5 String lastname = request.getParameter("lastname");
6 String username = firstname + lastname;
7 Date timestamp = new Date();
8 Cookie cookie = new Cookie("username", username);
9 cookie.setMaxAge(60*60*24); //24 hours
10 response.addCookie(cookie);
11 %>
12
13 <html>
14 <body>
15 <a href="viewcookie.jsp">Continue</a>
16 </body>
17 </html>