cookie.setPath(contextPath==null?"/":contextPath);
cookie.setPath((contextPath==null||contextPath.length()==0)?"/":contextPath);
    public Cookie getSessionCookie(HttpSession session,String contextPath, boolean requestIsSecure)    {        if (isUsingCookies())        {            Cookie cookie = getHttpOnly()                ?new HttpOnlyCookie(SessionManager.__SessionCookie,session.getId())                :new Cookie(SessionManager.__SessionCookie,session.getId());                       cookie.setPath(contextPath==null?"/":contextPath);            cookie.setMaxAge(-1);            cookie.setSecure(requestIsSecure && getSecureCookies());                        if (_context!=null)            {                String domain=_context.getInitParameter(SessionManager.__SessionDomain);                String maxAge=_context.getInitParameter(SessionManager.__MaxAge);                String path=_context.getInitParameter(SessionManager.__SessionPath);                                if (path!=null)                    cookie.setPath(path);                if (domain!=null)                    cookie.setDomain(domain);                       if (maxAge!=null)                    cookie.setMaxAge(Integer.parseInt(maxAge));            }                        return cookie;            }        return null;    }