• 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

delete cookie from request ?

 
Ranch Hand
Posts: 245
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a standard func that deletes cookie:



But this is done only when response arives to client.
I need to read request before that and read from it, that cookie does not exist any more.
So I need also to delete cookie from request.

How to do that ?
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I understand your question correctly, Cookies are created in server side and stored in client side. if cookie you have stored in client side expired, then it wont come with request. so no need to delete the cookie from request.
 
Miran Cvenkel
Ranch Hand
Posts: 245
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so, I have a 'samplepage 'with


1.that jumps to server
2.there I delete cookie server side , but that i not deleted until whole thing comes back to client,
that is, whole page is loaded, then on the end cookie is deleted, that is how I see it.
3. hence logoff link is stil visible, when I come back to same page,allthough it should not be
4. proof:click browser refresh, and logoff is gone

Edit: upper thing might be wrong, but anyway,
If at the time beeing at server side I 'delete' cookie from response, I would like to read somewhere that it is deleted,
the best thing seems to be to check current request, which still has it.
 
Ranch Hand
Posts: 326
Android Mac OS X Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make a two phase logout.

From client you call "logout".
Server does what it should and return you to a "/logoutevent.jsp" that clears the cookies and redirect you to the next page.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic