getSession(false), is returning an existing session and null if nothing is available, if that is the case, then creating a session in normail way, i.e. HttpSession session = request.getSession(); HttpSession session = request.getSession(true); in both the above ways, it is always creating a new session, so if we call isNew() on the session object then we should always get true, and if its always true, then how can we maintain session?
posted 10 years ago
in both the above ways, it is always creating a new session
No, request.getSession() will first check if its existing session, then it will return that otherwise will create new one. [ March 21, 2007: Message edited by: Ali Gohar ]
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads