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

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

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

Request.setRequestedSessionCookie介绍

[英]Set a flag indicating whether or not the requested session ID for this request came in through a cookie. This is normally called by the HTTP Connector, when it parses the request headers.
[中]设置一个标志,指示此请求的请求会话ID是否通过cookie传入。这通常由HTTP连接器在解析请求头时调用。

代码示例

代码示例来源:origin: org.glassfish.main.security/websecurity

public void setRequestedSessionCookie(boolean flag) {
  httpRequest.setRequestedSessionCookie(flag);
}

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

/* 541 */         request.setRequestedSessionCookie(true);
/* 542 */         request.setRequestedSessionURL(false);
/* 543 */         if (log.isDebugEnabled())

代码示例来源:origin: tomcat/catalina

request.setRequestedSessionId
  (scookie.getValue().toString());
request.setRequestedSessionCookie(true);
request.setRequestedSessionURL(false);
if (log.isDebugEnabled())

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

setRequestedSessionCookie(true);

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

request.setRequestedSessionId
  (scookie.getValue().toString());
request.setRequestedSessionCookie(true);
request.setRequestedSessionURL(false);
if (log.isDebugEnabled()) {

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

request.setRequestedSessionId
  (scookie.getValue().toString());
request.setRequestedSessionCookie(true);
request.setRequestedSessionURL(false);
if (log.isDebugEnabled())

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

request.setRequestedSessionId
  (scookie.getValue().toString());
request.setRequestedSessionCookie(true);
request.setRequestedSessionURL(false);
if (log.isDebugEnabled()) {

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

request.setRequestedSessionId
  (scookie.getValue().toString());
request.setRequestedSessionCookie(true);
request.setRequestedSessionURL(false);
if (log.isDebugEnabled()) {

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

/**
 * Parse session id in URL.
 */
protected void parseSessionCookiesId(org.apache.coyote.Request req, Request request) {
  // Parse session id from cookies
  Cookies serverCookies = req.getCookies();
  int count = serverCookies.getCookieCount();
  if (count <= 0)
    return;
  for (int i = 0; i < count; i++) {
    ServerCookie scookie = serverCookies.getCookie(i);
    if (scookie.getName().equals(Globals.SESSION_COOKIE_NAME)) {
      // Override anything requested in the URL
      if (!request.isRequestedSessionIdFromCookie()) {
        // Accept only the first session id cookie
        convertMB(scookie.getValue());
        request.setRequestedSessionId(scookie.getValue().toString());
        request.setRequestedSessionCookie(true);
        request.setRequestedSessionURL(false);
      } else {
        if (!isSessionIdValid(request, request.getRequestedSessionId())) {
          // Replace the session id until one is valid
          convertMB(scookie.getValue());
          request.setRequestedSessionId(scookie.getValue().toString());
        }
      }
    }
  }
}

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

request.setRequestedSessionId
  (scookie.getValue().toString());
request.setRequestedSessionCookie(true);
request.setRequestedSessionURL(false);
if (log.isDebugEnabled()) {

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

request.setRequestedSessionId
  (scookie.getValue().toString());
request.setRequestedSessionCookie(true);
request.setRequestedSessionURL(false);
if (log.isDebugEnabled())

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

request.setRequestedSessionId
  (scookie.getValue().toString());
request.setRequestedSessionCookie(true);
request.setRequestedSessionURL(false);
if (log.isDebugEnabled())

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

request.setRequestedSessionId
  (scookie.getValue().toString());
request.setRequestedSessionCookie(true);
request.setRequestedSessionURL(false);
if (log.isDebugEnabled()) {

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

/**
 * Parse session id in URL.
 */
protected void parseSessionCookiesId(org.apache.coyote.Request req, Request request) {
  // Parse session id from cookies
  Cookies serverCookies = req.getCookies();
  int count = serverCookies.getCookieCount();
  if (count <= 0)
    return;
  String cookieName = request.getContext().getSessionCookie().getName();
  for (int i = 0; i < count; i++) {
    ServerCookie scookie = serverCookies.getCookie(i);
    if (scookie.getName().equals(cookieName)) {
      // Override anything requested in the URL
      if (!request.isRequestedSessionIdFromCookie()) {
        // Accept only the first session id cookie
        convertMB(scookie.getValue());
        request.setRequestedSessionId(scookie.getValue().toString());
        request.setRequestedSessionCookie(true);
        request.setRequestedSessionURL(false);
      } else {
        if (!isSessionIdValid(request, request.getRequestedSessionId())) {
          // Replace the session id until one is valid
          convertMB(scookie.getValue());
          request.setRequestedSessionId(scookie.getValue().toString());
        }
      }
    }
  }
}

相关文章

Request类方法