• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

How to set cookies for HTTPS?

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Can't .... do .... plaid .... So I did this tiny ad instead:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic