Setting the cookies
Hi
I trying to add the cookie into local machines.Problems is i written cookie program on cookietest.jsp then i incude this jsp into index.jsp.When accessing the index.jsp the cookies are not setting But when iam acessing cookietest.jsp cookies are adding.why index.jsp accessing time not adding?please help me how to achive this one.
below the code snippet
**********************cookietest.jsp***********************
<%@ page import="java.util.Date"%>
<%@ page import="java.net.*"%>
<%
Date now = new Date();
String timestamp = now.toString();
Cookie cookie = new Cookie ("Venkateswarlu", "ravi");
cookie.setMaxAge(365 * 24 * 60 * 60);
response.addCookie(cookie);
%>
<HTML>
<HEAD>
</HEAD>
<BODY>
</BODY>
</HTML>
**************************end*****************************
***********************index.jsp***************************
<jsp:include page="/cookietest.jsp"/>
Thanks for advace
Venkatesearlu Ravi

