List of usage examples for org.apache.http.cookie SetCookie setPath
void setPath(String path);
From source file:org.nextlets.erc.defaults.http.ERCHttpInvokerImpl.java
private Cookie toCookie(URI uri, HttpCookie httpCookie) { SetCookie cookie = new BasicClientCookie(httpCookie.getName(), httpCookie.getValue()); cookie.setComment(httpCookie.getComment()); if (httpCookie.getDomain() != null) { cookie.setDomain(httpCookie.getDomain()); } else {/*w w w . j a v a 2 s .co m*/ cookie.setDomain(uri.getHost()); } if (httpCookie.getMaxAge() != -1) { cookie.setExpiryDate(new Date(httpCookie.getMaxAge() * 1000)); } if (httpCookie.getPath() != null) { cookie.setPath(httpCookie.getPath()); } else { cookie.setPath(uri.getPath()); } cookie.setSecure(httpCookie.getSecure()); cookie.setVersion(httpCookie.getVersion()); return cookie; }