By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,228 Members | 1,374 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,228 IT Pros & Developers. It's quick & easy.

Problem with the date of expiration of a cookie.

P: n/a
Hi,

I want to set up a cookie in a web page.

We use ISML file which contains HTML and ISML code (particular
language), translated into a JavaServerPages template (jsp). The JSP
file is then compiled in a Java Source File.

In my ISML file, I write :
<iscookie name="#CKNAME#" value="#CKVAL#" path="/" maxage="300">

maxage : lifetime of the cookie (in the ISML doc).

This generates the code :

{
try
{
Cookie cookie=new
Cookie(getFormatedValue(getObject("CKNAME"),null), getFormatedValue(getObject("CKVAL"),null));
cookie.setPath("/");
cookie.setMaxAge(300);
cookie.setVersion(0);
cookie.setSecure(false);
response.addCookie(cookie);
}
catch(Exception e)
{
Logger.log (LogScope.ERROR, "core",this,"core.ISML_ISCOOKIEError"
,"63",e.getClass().getName() + "(" + e.getMessage() + ")");
}
}
The cookie is created with the good name, value , domain but it isn't
deleted
at the end of the 300 seconds.

Is someone have an idea or an explication ?

Thanks for your help.

Marc Olivier Alfonsi
Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.