aspose file tools
The moose likes Servlets and the fly likes Unable to track session hits Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Unable to track session hits" Watch "Unable to track session hits" New topic

Unable to track session hits

Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157


I was trying out an example for session tracking in servlets using HttpSession interface as follows:

No matter how many times I hit the servlet, I get different sessionID. Why is the session not being tracked?

It is not displaying the incremented value of visitCount for subsequent requests. Can anyone tell me where am I going wrong?

~ Mansukh
Gaurav Wadhwani
Ranch Hand

Joined: Sep 21, 2010
Posts: 68
I tried the cde and it works fine in IE. Session id remains same even after refreshing. Also the value is incremented each time.

Maybe you need to delete cookies and try again. Or try in a different browser.
jQuery in Action, 2nd edition
subject: Unable to track session hits