本文整理了Java中org.apache.catalina.connector.Request.addLocale
方法的一些代码示例,展示了Request.addLocale
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.addLocale
方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:addLocale
[英]Add a Locale to the set of preferred Locales for this Request. The first added Locale will be the first one returned by getLocales().
[中]将区域设置添加到此请求的首选区域设置集中。第一个添加的区域设置将是getLocales()返回的第一个区域设置。
代码示例来源:origin: org.glassfish.main.security/websecurity
public void addLocale(Locale locale) {
httpRequest.addLocale(locale);
}
代码示例来源: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);
}
}
}
代码示例来源:origin: tomcat/catalina
while (values.hasNext()) {
Locale locale = (Locale) values.next();
addLocale(locale);
代码示例来源:origin: jboss.web/jbossweb
while (values.hasNext()) {
Locale locale = (Locale) values.next();
addLocale(locale);
代码示例来源:origin: org.jboss.web/jbossweb
addLocale(locale);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
addLocale(locale);
代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat
Iterator locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale((Locale) locales.next());
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas7
Iterator locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale((Locale) locales.next());
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas5
Iterator locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale((Locale) locales.next());
代码示例来源:origin: codefollower/Tomcat-Research
Iterator<Locale> locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale(locales.next());
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
Iterator<Locale> locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale(locales.next());
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
Iterator<Locale> locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale(locales.next());
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
Iterator<Locale> locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale(locales.next());
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6
Iterator locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale((Locale) locales.next());
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
Iterator<Locale> locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale(locales.next());
代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat
Iterator locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale((Locale) locales.next());
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
Iterator<Locale> locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale(locales.next());
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
Iterator<Locale> locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale(locales.next());
代码示例来源:origin: tomcat/catalina
Iterator locales = saved.getLocales();
while (locales.hasNext()) {
request.addLocale((Locale) locales.next());
内容来源于网络,如有侵权,请联系作者删除!