org.apache.catalina.connector.Response.addCookieInternal()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.apache.catalina.connector.Response.addCookieInternal方法的一些代码示例,展示了Response.addCookieInternal的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.addCookieInternal方法的具体详情如下:
包路径:org.apache.catalina.connector.Response
类名称:Response
方法名:addCookieInternal

Response.addCookieInternal介绍

[英]Add the specified Cookie to those that will be included with this Response.
[中]将指定的Cookie添加到此响应中包含的Cookie。

代码示例

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Add the specified Cookie to those that will be included with
 * this Response.
 *
 * @param cookie Cookie to be added
 */
public void addCookie(final Cookie cookie) {
  // Ignore any call from an included servlet
  if (included)
    return;
  addCookieInternal(cookie);
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Add the specified Cookie to those that will be included with
 * this Response.
 *
 * @param cookie Cookie to be added
 */
public void addCookie(final Cookie cookie) {
  // Ignore any call from an included servlet
  if (included)
    return;
  addCookieInternal(cookie);
}

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

/*      */   public void addCookie(Cookie cookie)
/*      */   {
/*  933 */     if (this.included) {
/*  934 */       return;
/*      */     }
/*  936 */     addCookieInternal(cookie);
/*      */   }

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Change the ID of the session that this request is associated with. There
 * are several things that may trigger an ID change. These include mmoving
 * between nodes in a cluster and session fixation prevention during the
 * authentication process.
 * 
 * @param session   The session to change the session ID for
 */
public void changeSessionId(String newSessionId) {
  // This should only ever be called if there was an old session ID but
  // double check to be sure
  if (requestedSessionId != null && requestedSessionId.length() > 0) {
    requestedSessionId = newSessionId;
  }
  
  if (context != null && !context.getServletContext()
      .getEffectiveSessionTrackingModes().contains(
          SessionTrackingMode.COOKIE))
    return;
  
  if (response != null) {
    Cookie cookie = new Cookie(context.getSessionCookie().getName(), newSessionId);
    configureSessionCookie(cookie);
    response.addCookieInternal(cookie);
  }
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Change the ID of the session that this request is associated with. There
 * are several things that may trigger an ID change. These include mmoving
 * between nodes in a cluster and session fixation prevention during the
 * authentication process.
 * 
 * @param session   The session to change the session ID for
 */
public void changeSessionId(String newSessionId) {
  // This should only ever be called if there was an old session ID but
  // double check to be sure
  if (requestedSessionId != null && requestedSessionId.length() > 0) {
    requestedSessionId = newSessionId;
  }
  
  if (context != null && !context.getServletContext()
      .getEffectiveSessionTrackingModes().contains(
          SessionTrackingMode.COOKIE))
    return;
  
  if (response != null) {
    String cookieName = context.getSessionCookie().getName();
    if (cookieName == null) {
      cookieName = Globals.SESSION_COOKIE_NAME;
    }
    Cookie cookie = new Cookie(cookieName, newSessionId);
    configureSessionCookie(cookie);
    response.addCookieInternal(cookie);
  }
}

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

/* 2321 */       this.response.addCookieInternal(cookie);

代码示例来源:origin: jboss.web/jbossweb

response.addCookieInternal(cookie);

代码示例来源:origin: org.jboss.web/jbossweb

Cookie cookie = new Cookie(context.getSessionCookie().getName(), session.getIdInternal());
configureSessionCookie(cookie);
response.addCookieInternal(cookie);

相关文章

微信公众号

最新文章

更多

Response类方法