Answers for "java ee check if session exists or is new"

1

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
}
Posted by: Guest on March-17-2021

Code answers related to "java ee check if session exists or is new"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language