java ee check if session exists or is new

Solutions on MaxInterview for java ee check if session exists or is new by the best coders in the world

showing results for - "java ee check if session exists or is new"
Mélissa
13 Mar 2019
1if(session.getAttribute("foo") == null){
2  // Session does not exist (Actually, the attribute just isn't set, but it works)
3}else{
4  // Session does exist
5}