General J2EE: How AJAX can see a Servlet's session?

  1. How AJAX can see a Servlet's session? (1 messages)

    Hello dudes, i'm trying to use XMLHttpRequest to make some facilities in my web page, the problem here is that my application store user's information in a session object. Once this object exists our user is correct logged in my application otherwise a error is displayed. Ok, but AJAX is like a request completely out of browser or servlet session.

      How can i make a request with XMLHttpRequest and don't lose my servlet session?

  2. Try to set cookie value with setRequestHeader.