org.apache.catalina.Manager.changeSessionId()方法的使用及代码示例

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

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

Manager.changeSessionId介绍

[英]Change the session ID of the current session to a new randomly generated session ID.
[中]将当前会话的会话ID更改为随机生成的新会话ID。

代码示例

代码示例来源:origin: org.glassfish.main.web/web-core

manager.changeSessionId(session);
String newSessionId = session.getId();

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

/**
 * Changes the session ID of the session associated with this request.
 *
 * @return the old session ID before it was changed
 * @see javax.servlet.http.HttpSessionIdListener
 * @since Servlet 3.1
 */
@Override
public String changeSessionId() {
  Session session = this.getSessionInternal(false);
  if (session == null) {
    throw new IllegalStateException(
      sm.getString("coyoteRequest.changeSessionId"));
  }
  Manager manager = this.getContext().getManager();
  manager.changeSessionId(session);
  String newSessionId = session.getId();
  this.changeSessionId(newSessionId);
  return newSessionId;
}

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

/**
 * Changes the session ID of the session associated with this request.
 *
 * @return the old session ID before it was changed
 * @see javax.servlet.http.HttpSessionIdListener
 * @since Servlet 3.1
 */
@Override
public String changeSessionId() {
  Session session = this.getSessionInternal(false);
  if (session == null) {
    throw new IllegalStateException(
      sm.getString("coyoteRequest.changeSessionId"));
  }
  Manager manager = this.getContext().getManager();
  manager.changeSessionId(session);
  String newSessionId = session.getId();
  this.changeSessionId(newSessionId);
  return newSessionId;
}

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

/**
 * Changes the session ID of the session associated with this request.
 *
 * @return the old session ID before it was changed
 * @see javax.servlet.http.HttpSessionIdListener
 * @since Servlet 3.1
 */
@Override
public String changeSessionId() {
  Session session = this.getSessionInternal(false);
  if (session == null) {
    throw new IllegalStateException(
      sm.getString("coyoteRequest.changeSessionId"));
  }
  Manager manager = this.getContext().getManager();
  manager.changeSessionId(session);
  String newSessionId = session.getId();
  this.changeSessionId(newSessionId);
  return newSessionId;
}

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

/**
 * change session id and send to all cluster nodes
 *
 * @param request current request
 * @param sessionId
 *            original session id
 * @param newSessionID
 *            new session id for node migration
 * @param catalinaSession
 *            current session with original session id
 */
protected void changeSessionID(Request request, String sessionId,
    String newSessionID, Session catalinaSession) {
  fireLifecycleEvent("Before session migration", catalinaSession);
  catalinaSession.getManager().changeSessionId(catalinaSession, newSessionID);
  changeRequestSessionID(request, sessionId, newSessionID);
  fireLifecycleEvent("After session migration", catalinaSession);
  if (log.isDebugEnabled()) {
    log.debug(sm.getString("jvmRoute.changeSession", sessionId,
        newSessionID));
  }
}

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

/**
 * change session id and send to all cluster nodes
 *
 * @param request current request
 * @param sessionId
 *            original session id
 * @param newSessionID
 *            new session id for node migration
 * @param catalinaSession
 *            current session with original session id
 */
protected void changeSessionID(Request request, String sessionId,
    String newSessionID, Session catalinaSession) {
  fireLifecycleEvent("Before session migration", catalinaSession);
  catalinaSession.getManager().changeSessionId(catalinaSession, newSessionID);
  changeRequestSessionID(request, sessionId, newSessionID);
  fireLifecycleEvent("After session migration", catalinaSession);
  if (log.isDebugEnabled()) {
    log.debug(sm.getString("jvmRoute.changeSession", sessionId,
        newSessionID));
  }
}

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

if (session != null && changeSessionIdOnAuthentication) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session);
  request.changeSessionId(session.getId());

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

if (session != null) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session, request.getRandom());
  request.changeSessionId(session.getId());

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

if (changeSessionIdOnAuthentication) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session, request.getRandom());
  request.changeSessionId(session.getId());

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

if (changeSessionIdOnAuthentication) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session);
  request.changeSessionId(session.getId());

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

if (changeSessionIdOnAuthentication) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session);
  request.changeSessionId(session.getId());

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

if (changeSessionIdOnAuthentication) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session);
  request.changeSessionId(session.getId());

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

if (changeSessionIdOnAuthentication) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session);
  request.changeSessionId(session.getId());

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

if (changeSessionIdOnAuthentication) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session);
  request.changeSessionId(session.getId());

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

if (session != null) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session);
  request.changeSessionId(session.getId());

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

if (session != null) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session);
  request.changeSessionId(session.getId());

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

if (session != null) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session);
  request.changeSessionId(session.getId());

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

manager.changeSessionId(session);
request.changeSessionId(session.getId());
if (log.isDebugEnabled()) {

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

if (session != null) {
  Manager manager = request.getContext().getManager();
  manager.changeSessionId(session);
  request.changeSessionId(session.getId());

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

manager.changeSessionId(session);
request.changeSessionId(session.getId());
if (log.isDebugEnabled()) {

相关文章