I have java application which has token based authentication , I am not using servlets ,once user is logged in i need to maintain the session for some time . i am not able to figure out how to achieve this.
if(response_code == 200){
//logged in and set session here
}
else{
//unauthorized
}
the above shows the skeleton and session needs to be set there, so even if user comes without token next time he should be able to log in. How to achieve this in java