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

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

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

Response.addSessionCookieInternal介绍

[英]Special method for adding a session cookie as we should be overriding any previous
[中]添加会话cookie的特殊方法,因为我们应该覆盖任何以前的

代码示例

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Change the ID of the session that this request is associated with. There
 * are several things that may trigger an ID change. These include moving
 * between nodes in a cluster and session fixation prevention during the
 * authentication process.
 * 
 * @param newSessionId   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 newCookie =
      ApplicationSessionCookieConfig.createSessionCookie(context,
          newSessionId, secure);
    response.addSessionCookieInternal(newCookie);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Change the ID of the session that this request is associated with. There
 * are several things that may trigger an ID change. These include moving
 * between nodes in a cluster and session fixation prevention during the
 * authentication process.
 * 
 * @param newSessionId   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 newCookie =
      ApplicationSessionCookieConfig.createSessionCookie(context,
          newSessionId, secure);
    response.addSessionCookieInternal(newCookie);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Change the ID of the session that this request is associated with. There
 * are several things that may trigger an ID change. These include moving
 * between nodes in a cluster and session fixation prevention during the
 * authentication process.
 * 
 * @param newSessionId   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 newCookie =
      ApplicationSessionCookieConfig.createSessionCookie(context,
          newSessionId, secure);
    response.addSessionCookieInternal(newCookie);
  }
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Change the ID of the session that this request is associated with. There
 * are several things that may trigger an ID change. These include moving
 * between nodes in a cluster and session fixation prevention during the
 * authentication process.
 *
 * @param newSessionId   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 newCookie =
      ApplicationSessionCookieConfig.createSessionCookie(context,
          newSessionId, secure);
    response.addSessionCookieInternal(newCookie);
  }
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Change the ID of the session that this request is associated with. There
 * are several things that may trigger an ID change. These include moving
 * between nodes in a cluster and session fixation prevention during the
 * authentication process.
 *
 * @param newSessionId   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 newCookie =
      ApplicationSessionCookieConfig.createSessionCookie(context,
          newSessionId, secure);
    response.addSessionCookieInternal(newCookie);
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Change the ID of the session that this request is associated with. There
 * are several things that may trigger an ID change. These include moving
 * between nodes in a cluster and session fixation prevention during the
 * authentication process.
 *
 * @param newSessionId   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 newCookie =
      ApplicationSessionCookieConfig.createSessionCookie(context,
          newSessionId, isSecure());
    response.addSessionCookieInternal(newCookie);
  }
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Change the ID of the session that this request is associated with. There
 * are several things that may trigger an ID change. These include moving
 * between nodes in a cluster and session fixation prevention during the
 * authentication process.
 *
 * @param newSessionId   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;
  }
  Context context = getContext();
  if (context != null
      && !context.getServletContext()
          .getEffectiveSessionTrackingModes()
          .contains(SessionTrackingMode.COOKIE)) {
    return;
  }
  if (response != null) {
    Cookie newCookie =
      ApplicationSessionCookieConfig.createSessionCookie(context,
          newSessionId, isSecure());
    response.addSessionCookieInternal(newCookie);
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Change the ID of the session that this request is associated with. There
 * are several things that may trigger an ID change. These include moving
 * between nodes in a cluster and session fixation prevention during the
 * authentication process.
 *
 * @param newSessionId   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;
  }
  Context context = getContext();
  if (context != null
      && !context.getServletContext()
          .getEffectiveSessionTrackingModes()
          .contains(SessionTrackingMode.COOKIE)) {
    return;
  }
  if (response != null) {
    Cookie newCookie =
      ApplicationSessionCookieConfig.createSessionCookie(context,
          newSessionId, isSecure());
    response.addSessionCookieInternal(newCookie);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

context, session.getIdInternal(), isSecure());
response.addSessionCookieInternal(cookie);

代码示例来源:origin: codefollower/Tomcat-Research

context, session.getIdInternal(), isSecure());
response.addSessionCookieInternal(cookie);

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

context, session.getIdInternal(), isSecure());
response.addSessionCookieInternal(cookie);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

context, session.getIdInternal(), isSecure());
response.addSessionCookieInternal(cookie);

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

context, session.getIdInternal(), isSecure());
response.addSessionCookieInternal(cookie);

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

context, session.getIdInternal(), isSecure());
response.addSessionCookieInternal(cookie);

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

context, session.getIdInternal(), isSecure());
response.addSessionCookieInternal(cookie);

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

context, session.getIdInternal(), isSecure());
response.addSessionCookieInternal(cookie);

相关文章

微信公众号

最新文章

更多

Response类方法