Cookie setting in JSP

by Vinoth 2010-01-28 18:55:34

Cookie setting in JSP. We can set cookie by using the below code
<%
Cookie cookie = new Cookie ("id",Integer.toString(uid));
cookie.setMaxAge(365 * 24 * 60 * 60);// Setting max age for the cookie
%>

Tagged in:

1182
like
0
dislike
0
mail
flag

You must LOGIN to add comments