本文整理了Java中org.apache.catalina.connector.Request.addCookie
方法的一些代码示例,展示了Request.addCookie
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.addCookie
方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:addCookie
[英]Add a Cookie to the set of Cookies associated with this Request.
[中]将Cookie添加到与此请求关联的Cookie集中。
代码示例来源:origin: org.glassfish.main.security/websecurity
public void addCookie(Cookie cookie) {
httpRequest.addCookie(cookie);
}
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
private void setCookie(final RequestContext requestContext, final RewriteRule rule) {
final Cookie cookie = new Cookie(rule.getCookieName(), rule.getCookieResult());
ofNullable(rule.getCookieDomain()).ifPresent(cookie::setDomain);
ofNullable(rule.getCookieLifetime()).ifPresent(cookie::setMaxAge);
ofNullable(rule.getCookiePath()).ifPresent(cookie::setPath);
ofNullable(rule.isCookieSecure()).ifPresent(cookie::setSecure);
ofNullable(rule.isCookieHttpOnly()).ifPresent(cookie::setHttpOnly);
requestContext.getResponse().addCookie(cookie);
requestContext.getRequest().addCookie(cookie);
@SuppressWarnings("unchecked")
List<Cookie> cookies = requestContext.get("cookies", List.class);
if (cookies == null) {
cookies = new ArrayList<>();
requestContext.set("cookies", cookies);
}
cookies.add(cookie);
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat
Iterator cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie((Cookie) cookies.next());
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas7
Iterator cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie((Cookie) cookies.next());
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas5
Iterator cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie((Cookie) cookies.next());
代码示例来源:origin: codefollower/Tomcat-Research
Iterator<Cookie> cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie(cookies.next());
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
Iterator<Cookie> cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie(cookies.next());
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
Iterator<Cookie> cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie(cookies.next());
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
Iterator<Cookie> cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie(cookies.next());
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6
Iterator cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie((Cookie) cookies.next());
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
Iterator<Cookie> cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie(cookies.next());
代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat
Iterator cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie((Cookie) cookies.next());
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
Iterator<Cookie> cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie(cookies.next());
代码示例来源:origin: org.jboss.web/jbossweb
Iterator cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie((Cookie) cookies.next());
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
Iterator<Cookie> cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie(cookies.next());
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
Iterator<Cookie> cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie(cookies.next());
代码示例来源:origin: jboss.web/jbossweb
Iterator cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie((Cookie) cookies.next());
代码示例来源:origin: tomcat/catalina
Iterator cookies = saved.getCookies();
while (cookies.hasNext()) {
request.addCookie((Cookie) cookies.next());
内容来源于网络,如有侵权,请联系作者删除!