Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Reading a cookie from JSF


If you ever need to read a Cookie from JSF, maybe this will help you:

    Object my_cookie = FacesContext.getCurrentInstance().getExternalContext()
    .getRequestCookieMap().get("my_project");
    if (my_cookie != null) {
        String name = (((Cookie) my_cookie).getName());
        String value = (((Cookie) my_cookie).getValue());
    }



This post first appeared on Java, please read the originial post: here

Share the post

Reading a cookie from JSF

×

Subscribe to Java

Get updates delivered right to your inbox!

Thank you for your subscription

×