java ee check if session exists or is new code example
Example: java ee check if session exists or is new
if(session.getAttribute("foo") == null){
// Session does not exist (Actually, the attribute just isn't set, but it works)
}else{
// Session does exist
}