I\'m trying to implement session tracking on my website. Basically I want the users to be able to login in my website using their username and their password, pass throw my webs
You can use Spring Security. It has all the features you require. Spring Security provides comprehensive security services for J2EE-based enterprise software applications.
The framework will authenticate and authorize the user based on the configuration done in the framework. And will automatically save the user state in the session. You don't have to explicitly deal with sessions.