• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to set httponly to false for a secure cookie in servlet2.5

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As below i m creating cookie .



I am trying to read that cookie in javascript as below.

var cookieValue = $.cookie("myck");

I can see the cookie in the browser. However the read is not happening I tried to set httponly to false



However it is throwing compilation error as my servlet version is 2.5

Is there any way to get the cookie in javascript?
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, are you sure that the cookie is HTTP only? You can check in Chrome by checking the Resources section of the Developer Tools, then Cookies, the site, then the HTTP column.

If it is, you will probably have to forget about using the Cookie class, and set the Set-Cookie header manually. That's not going to be a nice task though, because you also have to beware that you don't erase any other cookies.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic