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

x33g5p2x  于2022-01-18 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(111)

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

Context.getCookieProcessor介绍

暂无

代码示例

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

@Override
  public String run(){
    return context.getCookieProcessor().generateHeader(cookie);
  }
}

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

@Override
  public String run(){
    return context.getCookieProcessor().generateHeader(cookie);
  }
}

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

public String generateCookieString(final Cookie cookie) {
  // Web application code can receive a IllegalArgumentException
  // from the generateHeader() invocation
  if (SecurityUtil.isPackageProtectionEnabled()) {
    return AccessController.doPrivileged(
        new PrivilegedGenerateCookieString(getContext(), cookie));
  } else {
    return getContext().getCookieProcessor().generateHeader(cookie);
  }
}

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

public String generateCookieString(final Cookie cookie) {
  // Web application code can receive a IllegalArgumentException
  // from the generateHeader() invocation
  if (SecurityUtil.isPackageProtectionEnabled()) {
    return AccessController.doPrivileged(
        new PrivilegedGenerateCookieString(getContext(), cookie));
  } else {
    return getContext().getCookieProcessor().generateHeader(cookie);
  }
}

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

/**
 * Add the specified Cookie to those that will be included with
 * this Response.
 *
 * @param cookie Cookie to be added
 */
@Override
public void addCookie(final Cookie cookie) {
  // Ignore any call from an included servlet
  if (included || isCommitted()) {
    return;
  }
  cookies.add(cookie);
  String header = generateCookieString(cookie);
  //if we reached here, no exception, cookie is valid
  // the header name is Set-Cookie for both "old" and v.1 ( RFC2109 )
  // RFC2965 is not supported by browsers and the Servlet spec
  // asks for 2109.
  addHeader("Set-Cookie", header, getContext().getCookieProcessor().getCharset());
}

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

/**
 * Add the specified Cookie to those that will be included with
 * this Response.
 *
 * @param cookie Cookie to be added
 */
@Override
public void addCookie(final Cookie cookie) {
  // Ignore any call from an included servlet
  if (included || isCommitted()) {
    return;
  }
  cookies.add(cookie);
  String header = generateCookieString(cookie);
  //if we reached here, no exception, cookie is valid
  // the header name is Set-Cookie for both "old" and v.1 ( RFC2109 )
  // RFC2965 is not supported by browsers and the Servlet spec
  // asks for 2109.
  addHeader("Set-Cookie", header, getContext().getCookieProcessor().getCharset());
}

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

/**
 * Parse cookies. This only parses the cookies into the memory efficient
 * ServerCookies structure. It does not populate the Cookie objects.
 */
protected void parseCookies() {
  if (cookiesParsed) {
    return;
  }
  cookiesParsed = true;
  ServerCookies serverCookies = coyoteRequest.getCookies();
  serverCookies.setLimit(connector.getMaxCookieCount());
  CookieProcessor cookieProcessor = getContext().getCookieProcessor();
  cookieProcessor.parseCookieHeader(coyoteRequest.getMimeHeaders(), serverCookies);
}

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

/**
 * Parse cookies. This only parses the cookies into the memory efficient
 * ServerCookies structure. It does not populate the Cookie objects.
 */
protected void parseCookies() {
  if (cookiesParsed) {
    return;
  }
  cookiesParsed = true;
  ServerCookies serverCookies = coyoteRequest.getCookies();
  serverCookies.setLimit(connector.getMaxCookieCount());
  CookieProcessor cookieProcessor = getContext().getCookieProcessor();
  cookieProcessor.parseCookieHeader(coyoteRequest.getMimeHeaders(), serverCookies);
}

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

catalinaRequest.getContext().getCookieProcessor()));

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

catalinaRequest.getContext().getCookieProcessor()));

代码示例来源:origin: apache/ofbiz-framework

MessageBytes value = mimeHeaders.getValue(i);
if (value.indexOf(cookie.getName()) >= 0) {
  String newCookieValue = request.getContext().getCookieProcessor().generateHeader(newCookie);
  if (Debug.verboseOn()) Debug.logVerbose("CrossSubdomainSessionValve: old Set-Cookie value: " + value.toString(), module);
  if (Debug.verboseOn()) Debug.logVerbose("CrossSubdomainSessionValve: new Set-Cookie value: " + newCookieValue, module);

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

CookieProcessor cookieProcessor = getContext().getCookieProcessor();

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

CookieProcessor cookieProcessor = getContext().getCookieProcessor();

相关文章

微信公众号

最新文章

更多

Context类方法