We have a login section with a remember me checkbox on the first page of our application. For some reason, ctx is null when it reaches here:
protected Cookie getCookie() { FacesContext ctx = FacesContext.getCurrentInstance(); if (ctx != null) { return (Cookie) ctx.getExternalContext().getRequestCookieMap() .get( getCookieName() ); } else { return null; } }