private void removeSessionFile(){
  File fileNew=(File)session.get(Constants.SESSION_FILE);
  if (fileNew != null && fileNew.exists()) {
    fileNew.delete();
  }
  session.remove(Constants.SESSION_FILE);
  session.remove(Constants.SESSION_FILE_NAME);
  session.remove(Constants.SESSION_FILE_CONTENT_TYPE);
}

private void removeSessionFile ( ) { File fileNew = ( File ) session . get ( Constants . SESSION_FILE ) ; if ( fileNew != null && fileNew . exists ( ) ) { fileNew . delete ( ) ; } session . remove ( Constants . SESSION_FILE ) ; session . remove ( Constants . SESSION_FILE_NAME ) ; session . remove ( Constants . SESSION_FILE_CONTENT_TYPE ) ; }
remove any previous uploaded file in temporal directory . and clean some session variables used to confirm overwrite action .
