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