Example usage for org.apache.shiro.web.servlet Cookie getValue

List of usage examples for org.apache.shiro.web.servlet Cookie getValue

Introduction

In this page you can find the example usage for org.apache.shiro.web.servlet Cookie getValue.

Prototype

String getValue();

Source Link

Usage

From source file:com.rekoe.shiro.web.SimpleCookie.java

License:Apache License

public SimpleCookie(Cookie cookie) {
    this.name = cookie.getName();
    this.value = cookie.getValue();
    this.comment = cookie.getComment();
    this.domain = cookie.getDomain();
    this.path = cookie.getPath();
    this.maxAge = Math.max(DEFAULT_MAX_AGE, cookie.getMaxAge());
    this.version = Math.max(DEFAULT_VERSION, cookie.getVersion());
    this.secure = cookie.isSecure();
    this.httpOnly = cookie.isHttpOnly();
}

From source file:com.rekoe.shiro.web.SimpleCookie.java

License:Apache License

public String readValue(HttpServletRequest request, HttpServletResponse ignored) {
    String name = getName();//  ww w.  ja va2s.c o m
    String value = null;
    javax.servlet.http.Cookie cookie = getCookie(request, name);
    if (cookie != null) {
        value = cookie.getValue();
        log.debug("Found '{}' cookie value [{}]", name, value);
    } else {
        log.trace("No '{}' cookie value", name);
    }

    return value;
}