This content has been marked as final. 
    
Show                 2 replies
    
- 
        1. Re: Cookie in seambabazs Jun 1, 2010 7:53 AM (in response to engheba)Try these lines for add an entry to the cookie:
 Cookie cookie = new Cookie("name",id);
 cookie.setMaxAge(maxAge);
 cookie.setPath("/xyzPath");
 ((HttpServletResponse) facesContext.getExternalContext().getResponse()).addCookie(cookie);
 And these lines for retrieve an entry from the cookie:
 for (Cookie cookie : ((HttpServletRequest) facesContext. getExternalContext() .getRequest()).getCookies()) {
 if(cookie.getName().equals("name")){...}
 }
- 
        2. Re: Cookie in seamengheba Jun 1, 2010 8:21 AM (in response to engheba)Balázs Bakai thanks for your replay. 
 i tried this code but the length of the cookies array is 1
 and this cookie is jsessionid
 Unfortunately there is no cookie added.
 
    