Results 1 to 2 of 2
  1. #1
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default Browser Cookie Access

    How do you store browser cookies from an Applet? The APIs seem to suggest that you can but code like the following doesn't have any noticeable change on the cookies in the browser. Haven't been getting any exceptions from my signed applet.

    Java Code:
    resp = new HashMap<String, List<String>>();
    resp.put("Set-Cookie2", Arrays.asList(new String[] {
        "ProjectTest=ticket;Max-Age=100000;Domain=.srcf.ucam.org;Version=1"}));
    CookieHandler ch = CookieHandler.getDefault();
    ch.put(getCodeBase().toURI(), resp);
    Anyone know how to do this?
    Last edited by OrangeDog; 04-18-2009 at 02:08 AM.

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    *bump* - still nothing
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

Similar Threads

  1. Method access or field access
    By carderne in forum New To Java
    Replies: 2
    Last Post: 12-06-2008, 06:20 PM
  2. How to create Cookie for login function
    By javanewbie in forum Advanced Java
    Replies: 0
    Last Post: 11-11-2008, 04:03 PM
  3. Replies: 1
    Last Post: 11-07-2008, 05:49 PM
  4. Setting cookie fails when jarred
    By damounh in forum Java Applets
    Replies: 0
    Last Post: 05-08-2008, 02:41 PM
  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
  •