Question : java ee check if session exists or is new
Answered by : zwazel
if(session.getAttribute("foo") == null){ // Session does not exist (Actually, the attribute just isn't set, but it works)
}else{ // Session does exist
}
Source : https://stackoverflow.com/a/6504773/12287687 | Last Update : Wed, 24 Mar 21