Results 1 to 4 of 4

Thread: cookie in java

  1. #1
    aizen92 is offline Senior Member
    Join Date
    Nov 2010
    Posts
    155
    Rep Power
    4

    Default cookie in java

    Hello,

    I stumbled upon a project which I wanted to use in trying to develop my first mobile app, but the problem is this project is in C#, so now I'm trying to code it in java, but I got stuck on this point now, where the C# code uses a CookieContainer object, so I checked the java api, and found in the java.net an interface called CookieStore and a class called CookieManager. Now what I basically need is to hold all the cookies used in the requests and responses to the my site. So for those who know C#, or those who can help me with my problem, what should I use, CookieManager, CookieStore, or is there another data structure that can help me?

    Thanks in advance :D

    EDIT: here is the link to the C# library about the CookieContainer if anybody is interested.
    Last edited by aizen92; 11-20-2011 at 01:20 PM.

  2. #2
    aizen92 is offline Senior Member
    Join Date
    Nov 2010
    Posts
    155
    Rep Power
    4

    Default Re: cookie in java

    sry for double posting but i forgot to paste the link , and couldnt do it, so ill post it here until i edit the above post and and paste it there CookieContainer Class

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,658
    Blog Entries
    7
    Rep Power
    21

    Default Re: cookie in java

    According to the documentation, a CookieManager uses a CookieStore, so you should use a CookieManager ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    aizen92 is offline Senior Member
    Join Date
    Nov 2010
    Posts
    155
    Rep Power
    4

    Default Re: cookie in java

    Ok, thnx JosAh, I'll try it and see what I get :D

Similar Threads

  1. Help for logout and cookie
    By Sweety13 in forum Java Servlet
    Replies: 2
    Last Post: 01-12-2011, 06:59 AM
  2. Creating cookie ?
    By Char in forum Networking
    Replies: 8
    Last Post: 12-25-2010, 07:10 PM
  3. Setting domain of cookie
    By mintyzzz in forum Java Servlet
    Replies: 1
    Last Post: 10-23-2010, 04:29 AM
  4. Remove cookie
    By erakhman in forum Java Servlet
    Replies: 1
    Last Post: 08-09-2010, 11:16 AM
  5. Setting cookie from doPost
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-25-2008, 07:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •