Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2007
    Thanked 1 Time in 1 Post

    Lightbulb jsessionid and xmlhttprequests

    Hi All,

    I'm working on a code that makes XMLHttpRequests to a servlet under tomcat, and have a problem with JSESSIONID.

    when I go to the root page of the servlet, I see that the browser gets a JSESSIONID with a value like, for e.g.: "289AC12DA7F448E16F13A8D5D1B22125".

    then I have a login in which I use an ajax call, and I see that this request uses the same jsessionid that I mentioned above.

    after the login, I can move to the other parts of the program by using a menu, but when a new page is loaded, a different jsessionid is sent and this way the user is not recognized

    I'm trying to understand if I can resolv this issue by using cookies, but I'm not sure of what exactly I should do... can you help me in any way?


  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Thanked 163 Times in 160 Posts
    yea using cookies can simplify the code but, you can also extract the jsessionid and append it to the url
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


    Posting Permissions

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