本文整理了Java中org.apache.catalina.connector.Request.parseLocalesHeader
方法的一些代码示例,展示了Request.parseLocalesHeader
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.parseLocalesHeader
方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:parseLocalesHeader
[英]Parse accept-language header value.
[中]解析接受语言头值。
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
Enumeration<String> values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement();
parseLocalesHeader(value);
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
Enumeration<String> values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement();
parseLocalesHeader(value);
}
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
Enumeration<String> values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement();
parseLocalesHeader(value);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
Enumeration<String> values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement();
parseLocalesHeader(value);
}
}
代码示例来源:origin: tomcat/catalina
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
Enumeration values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement().toString();
parseLocalesHeader(value);
}
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
Enumeration values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement().toString();
parseLocalesHeader(value);
}
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
Enumeration values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement().toString();
parseLocalesHeader(value);
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
Enumeration<String> values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement();
parseLocalesHeader(value);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
Enumeration<String> values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement();
parseLocalesHeader(value);
}
}
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* */ protected void parseLocales()
/* */ {
/* 2500 */ this.localesParsed = true;
/* */
/* 2502 */ Enumeration values = getHeaders("accept-language");
/* */
/* 2504 */ while (values.hasMoreElements()) {
/* 2505 */ String value = values.nextElement().toString();
/* 2506 */ parseLocalesHeader(value);
/* */ }
/* */ }
/* */
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
// Store the accumulated languages that have been requested in
// a local collection, sorted by the quality value (so we can
// add Locales in descending order). The values will be ArrayLists
// containing the corresponding Locales to be added
TreeMap<Double, ArrayList<Locale>> locales = new TreeMap<>();
Enumeration<String> values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement();
parseLocalesHeader(value, locales);
}
// Process the quality values in highest->lowest order (due to
// negating the Double value when creating the key)
for (ArrayList<Locale> list : locales.values()) {
for (Locale locale : list) {
addLocale(locale);
}
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Parse request locales.
*/
protected void parseLocales() {
localesParsed = true;
// Store the accumulated languages that have been requested in
// a local collection, sorted by the quality value (so we can
// add Locales in descending order). The values will be ArrayLists
// containing the corresponding Locales to be added
TreeMap<Double, ArrayList<Locale>> locales = new TreeMap<>();
Enumeration<String> values = getHeaders("accept-language");
while (values.hasMoreElements()) {
String value = values.nextElement();
parseLocalesHeader(value, locales);
}
// Process the quality values in highest->lowest order (due to
// negating the Double value when creating the key)
for (ArrayList<Locale> list : locales.values()) {
for (Locale locale : list) {
addLocale(locale);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!