• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

How to secure cookie in servlet 2.4

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does any one know how to secure cookie in servlet 2.4?

I know, i cant use this below...is there any alternative way


 
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Secure cookie only means your session cookie should not be sent over plain http, only through through https (TLS) if the browser supports the secure cookie flag..

Use it only if your server needs the cookie only for https (TLS) access.

Note: old versions of TLS used to be called SSL but the term SSL is pretty out of date.
 
Saloon Keeper
Posts: 28745
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The best way to "secure a cookie" is not to use one at all. Keep the data server-side.

The second-best way is to only transmit it via SSL/TLS.

The jsessionid cookie is a special case, since it may exist before the user switched to secure communications (usually by logging in). In that particular case, the value of jsessionID is changed AFTER entering secure communications mode and the original jsessionid value becomes meaningless. Which is why webapps and server-side code should not play with the jsessionid themselves.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic