Results 1 to 2 of 2

Thread: Http session

  1. #1
    RD007 is offline Member
    Join Date
    May 2011
    Posts
    2
    Rep Power
    0

    Default Http session

    Hi All,

    I want to invalidate HttpSession in my java file.
    I used invalidate function.
    But still session is not getting killed.
    My code is:

    HttpSession oldSession = request.getSession();
    System.out.println("SESSION1" + oldSession);
    oldSession.invalidate();
    HttpSession newSession = request.getSession(true);
    System.out.println("SESSION2" + newSession);

    newsession prints the same old session id.

    Thanks in advance.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Share session between http and https
    By gnorro in forum Advanced Java
    Replies: 1
    Last Post: 02-09-2011, 09:02 AM
  2. session expires between http and https
    By hopfensp in forum Java Servlet
    Replies: 0
    Last Post: 12-18-2010, 04:30 PM
  3. Replies: 1
    Last Post: 04-22-2009, 12:20 AM
  4. Replies: 2
    Last Post: 12-23-2008, 07:35 PM
  5. which one to opt http session or cookies
    By amu in forum New To Java
    Replies: 1
    Last Post: 10-04-2008, 10:16 AM

Posting Permissions

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