• 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

cookies in java application

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm writing a small Java application that logs in to my mail.com webmail account and retrives the new message headers if any.
By http POSTing I've managed to log in but the webmail service relies on a cookie being present. So when I try to GET the page on which the new mails are listed mail.com thinks I'm logged out since it can't read the cookie.
How to I manage cookies in Java? It should be possible since there are Java web browsers (i think...).
Greatful for any tips and ideas!
/Jan Andersson
 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You pass cookies back and forth in HTTP headers.
Look at the examples in the old rfc at
http://www.ietf.org/rfc/rfc2109.txt
HTH,
Joe
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jan Andersson,

If you'd be willing, I'd appreciate a look at your code. That sounds like a great application to have.

Thank You,
-Dirk Schreckmann
 
Jan Andersson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aha, that RFQ should do it... So subsequent requests after logging in should include:

maybe...?

Dirk: No problem. But right now it doesn't do much besides logging in. I need to fix this cookie thing before seeing any results. I�ll get back to you then.
[ February 22, 2002: Message edited by: Jan Andersson ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic