wood burning stoves 2.0*
The moose likes Security and the fly likes How to set cookies for HTTPS? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "How to set cookies for HTTPS?" Watch "How to set cookies for HTTPS?" New topic
Author

How to set cookies for HTTPS?

Amit More
Greenhorn

Joined: Oct 16, 2003
Posts: 24
Hi friends,
For HTTP, I am creating one cookie object and setting the required parameters. The code looks like below:

Cookie cookie = new Cookie("Ispace_Auth", s19);
cookie.setDomain(sCookieDomain);
cookie.setPath("/");
cookie.setMaxAge(14400);
httpservletresponse.addCookie(cookie);
Here no problem with HTTP.
But when for same code I am trying to access files through internet over HTTPS, cookie is not getting created and hence giving me further problem. But if I am using URL rewriting then I can view my site and no problem.
But I dont want to use URL rewriting and hencforth wants to create cookies.
Is there any way to set the cookies for HTTPS server? Or can you provide some help under the cookie setting in Https server?
I am using Apache-Tomcat.
Its urgent. So please help me out.


Thanks,<br />Amit
 
Consider Paul's rocket mass heater.
 
subject: How to set cookies for HTTPS?
 
Similar Threads
URL Rewriting
Facing a problem when reading cookies having a colon in the value (Tomcat 6.0.32)
Creating Server Side Cookie
Session without cookies
cookie setting in HTTPS