private void clearCookie(String cookieName){
  String cookieDomain=null;
  Set<String> cookieDomainSet=AuthClientUtils.getCookieDomainsForRequest(request);
  if (cookieDomainSet.isEmpty()) {
    cookie=AuthUtils.createCookie(cookieName,LOGOUTCOOKIEVALUE,null);
    cookie.setMaxAge(0);
    response.addCookie(cookie);
  }
 else {
    Iterator iter=cookieDomainSet.iterator();
    while (iter.hasNext()) {
      cookieDomain=(String)iter.next();
      cookie=AuthUtils.createCookie(cookieName,LOGOUTCOOKIEVALUE,cookieDomain);
      cookie.setMaxAge(0);
      response.addCookie(cookie);
    }
  }
}

private void clearCookie ( String cookieName ) { String cookieDomain = null ; Set < String > cookieDomainSet = AuthClientUtils . getCookieDomainsForRequest ( request ) ; if ( cookieDomainSet . isEmpty ( ) ) { cookie = AuthUtils . createCookie ( cookieName , LOGOUTCOOKIEVALUE , null ) ; cookie . setMaxAge ( 0 ) ; response . addCookie ( cookie ) ; } else { Iterator iter = cookieDomainSet . iterator ( ) ; while ( iter . hasNext ( ) ) { cookieDomain = ( String ) iter . next ( ) ; cookie = AuthUtils . createCookie ( cookieName , LOGOUTCOOKIEVALUE , cookieDomain ) ; cookie . setMaxAge ( 0 ) ; response . addCookie ( cookie ) ; } } }
method to clear cookie based on the cookie name passed ( auth or am cookie )
