private File sessionStore(String ctxPath){
  String storeDir=System.getProperty("catalina.base");
  if (storeDir == null || storeDir.isEmpty()) {
    storeDir=System.getProperty("java.io.tmpdir");
  }
 else {
    storeDir+=System.getProperty("file.separator") + "temp";
  }
  File file=new File(storeDir,ctxPath.replaceAll("/","_") + ".sessions.ser");
  return (file);
}

private File sessionStore ( String ctxPath ) { String storeDir = System . getProperty ( "catalina.base" ) ; if ( storeDir == null || storeDir . isEmpty ( ) ) { storeDir = System . getProperty ( "java.io.tmpdir" ) ; } else { storeDir += System . getProperty ( "file.separator" ) + "temp" ; } File file = new File ( storeDir , ctxPath . replaceAll ( "/" , "_" ) + ".sessions.ser" ) ; return ( file ) ; }
return a file object representing the pathname to our persistence file , if any .
