本文整理了Java中org.apache.coyote.Request.getCookies
方法的一些代码示例,展示了Request.getCookies
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getCookies
方法的具体详情如下:
包路径:org.apache.coyote.Request
类名称:Request
方法名:getCookies
暂无
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Return the server representation of the cookies associated with this
* request. Triggers parsing of the Cookie HTTP headers (but not conversion
* to Cookie objects) if the headers have not yet been parsed.
*
* @return the server cookies
*/
public ServerCookies getServerCookies() {
parseCookies();
return coyoteRequest.getCookies();
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Return the server representation of the cookies associated with this
* request. Triggers parsing of the Cookie HTTP headers (but not conversion
* to Cookie objects) if the headers have not yet been parsed.
*
* @return the server cookies
*/
public ServerCookies getServerCookies() {
parseCookies();
return coyoteRequest.getCookies();
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
protected void recycleCookieInfo(boolean recycleCoyote) {
cookiesParsed = false;
cookiesConverted = false;
cookies = null;
if (recycleCoyote) {
getCoyoteRequest().getCookies().recycle();
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
protected void recycleCookieInfo(boolean recycleCoyote) {
cookiesParsed = false;
cookiesConverted = false;
cookies = null;
if (recycleCoyote) {
getCoyoteRequest().getCookies().recycle();
}
}
代码示例来源: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.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* 2361 */ Cookies serverCookies = this.coyoteRequest.getCookies();
/* 2362 */ int count = serverCookies.getCookieCount();
/* 2363 */ if (count <= 0) {
代码示例来源:origin: tomcat/catalina
Cookies serverCookies = coyoteRequest.getCookies();
int count = serverCookies.getCookieCount();
if (count <= 0)
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
Cookies serverCookies = coyoteRequest.getCookies();
int count = serverCookies.getCookieCount();
if (count <= 0)
代码示例来源:origin: jboss.web/jbossweb
Cookies serverCookies = coyoteRequest.getCookies();
int count = serverCookies.getCookieCount();
if (count <= 0)
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
Cookies serverCookies = coyoteRequest.getCookies();
int count = serverCookies.getCookieCount();
if (count <= 0)
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
Cookies serverCookies = coyoteRequest.getCookies();
int count = serverCookies.getCookieCount();
if (count <= 0)
代码示例来源:origin: codefollower/Tomcat-Research
Cookies serverCookies = coyoteRequest.getCookies();
int count = serverCookies.getCookieCount();
if (count <= 0) {
代码示例来源:origin: org.jboss.web/jbossweb
Cookies serverCookies = coyoteRequest.getCookies();
int count = serverCookies.getCookieCount();
if (count <= 0)
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
Cookies serverCookies = coyoteRequest.getCookies();
int count = serverCookies.getCookieCount();
if (count <= 0) {
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* */ protected void parseSessionCookiesId(org.apache.coyote.Request req, Request request)
/* 527 */ Cookies serverCookies = req.getCookies();
/* 528 */ int count = serverCookies.getCookieCount();
/* 529 */ if (count <= 0) {
代码示例来源:origin: tomcat/catalina
Cookies serverCookies = req.getCookies();
int count = serverCookies.getCookieCount();
if (count <= 0)
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
ServerCookies serverCookies = coyoteRequest.getCookies();
CookieProcessor cookieProcessor = getContext().getCookieProcessor();
代码示例来源: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.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());
}
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!