my dog learned polymorphism
The moose likes Servlets and the fly likes httpsession problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "httpsession problem" Watch "httpsession problem" New topic
Author

httpsession problem

ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 192
Hi,

As per specification, request.getSession(false) should return NULL if its a new request. But the problem is that its always returning session object in my application. I have a jsp and that jsp is hitting a servlet. I am writing request.getSession(false) in the servlet. There is no session specific code in my jsp. Please let me know if i am missing something.

regards,
Ajse
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874


Ajse,

What do you thik a JSP is ? its compiled to Servlet isnt it ? Did you notice what page session attributes are ? session defaults to "true" in JSP. So if you hit JSP , it creates a session if there is none , or uses the existing one.
ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 192
Thanks Balu for your reply.

regards,
Ajit
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: httpsession problem
 
Similar Threads
JSP can't pass Session to a servlet?
change password
JSP session tracking
Problems with sessions
session managment