This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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.
Don't get me started about those stupid light bulbs.
subject: Unable to track session hits
Similar Threads
how to declare....and pass parameters..
How to fill select list from database table
Jsp Sessions
Servlet calling EJB - compiling problems
problem executing the servlet