本文整理了Java中org.apache.catalina.connector.Request.parseLocales
方法的一些代码示例,展示了Request.parseLocales
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.parseLocales
方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:parseLocales
[英]Parse request locales.
[中]解析请求区域设置。
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* */ public Locale getLocale()
/* */ {
/* 998 */ if (!this.localesParsed) {
/* 999 */ parseLocales();
/* */ }
/* 1001 */ if (this.locales.size() > 0) {
/* 1002 */ return (Locale)this.locales.get(0);
/* */ }
/* 1004 */ return defaultLocale;
/* */ }
/* */
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* @return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
@Override
public Locale getLocale() {
if (!localesParsed) {
parseLocales();
}
if (locales.size() > 0) {
return locales.get(0);
}
return defaultLocale;
}
代码示例来源:origin: tomcat/catalina
/**
* Return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
public Locale getLocale() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0) {
return ((Locale) locales.get(0));
} else {
return (defaultLocale);
}
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
public Locale getLocale() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0) {
return ((Locale) locales.get(0));
} else {
return (defaultLocale);
}
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
public Locale getLocale() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0) {
return ((Locale) locales.get(0));
} else {
return (defaultLocale);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
@Override
public Locale getLocale() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0) {
return locales.get(0);
}
return defaultLocale;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
@Override
public Locale getLocale() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0) {
return locales.get(0);
}
return defaultLocale;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
@Override
public Locale getLocale() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0) {
return locales.get(0);
}
return defaultLocale;
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
@Override
public Locale getLocale() {
if (!localesParsed) {
parseLocales();
}
if (locales.size() > 0) {
return locales.get(0);
}
return defaultLocale;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* @return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
@Override
public Locale getLocale() {
if (!localesParsed) {
parseLocales();
}
if (locales.size() > 0) {
return locales.get(0);
}
return defaultLocale;
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
@Override
public Locale getLocale() {
if (!localesParsed) {
parseLocales();
}
if (locales.size() > 0) {
return locales.get(0);
}
return defaultLocale;
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Return the preferred Locale that the client will accept content in,
* based on the value for the first <code>Accept-Language</code> header
* that was encountered. If the request did not specify a preferred
* language, the server's default Locale is returned.
*/
@Override
public Locale getLocale() {
if (!localesParsed) {
parseLocales();
}
if (locales.size() > 0) {
return locales.get(0);
}
return defaultLocale;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* @return the set of preferred Locales that the client will accept
* content in, based on the values for any <code>Accept-Language</code>
* headers that were encountered. If the request did not specify a
* preferred language, the server's default Locale is returned.
*/
@Override
public Enumeration<Locale> getLocales() {
if (!localesParsed) {
parseLocales();
}
if (locales.size() > 0) {
return Collections.enumeration(locales);
}
ArrayList<Locale> results = new ArrayList<>();
results.add(defaultLocale);
return Collections.enumeration(results);
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Return the set of preferred Locales that the client will accept
* content in, based on the values for any <code>Accept-Language</code>
* headers that were encountered. If the request did not specify a
* preferred language, the server's default Locale is returned.
*/
@Override
public Enumeration<Locale> getLocales() {
if (!localesParsed) {
parseLocales();
}
if (locales.size() > 0) {
return Collections.enumeration(locales);
}
ArrayList<Locale> results = new ArrayList<Locale>();
results.add(defaultLocale);
return Collections.enumeration(results);
}
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* */ public Enumeration getLocales()
/* */ {
/* 1018 */ if (!this.localesParsed) {
/* 1019 */ parseLocales();
/* */ }
/* 1021 */ if (this.locales.size() > 0)
/* 1022 */ return new Enumerator(this.locales);
/* 1023 */ ArrayList results = new ArrayList();
/* 1024 */ results.add(defaultLocale);
/* 1025 */ return new Enumerator(results);
/* */ }
/* */
代码示例来源:origin: tomcat/catalina
/**
* Return the set of preferred Locales that the client will accept
* content in, based on the values for any <code>Accept-Language</code>
* headers that were encountered. If the request did not specify a
* preferred language, the server's default Locale is returned.
*/
public Enumeration getLocales() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0)
return (new Enumerator(locales));
ArrayList results = new ArrayList();
results.add(defaultLocale);
return (new Enumerator(results));
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Return the set of preferred Locales that the client will accept
* content in, based on the values for any <code>Accept-Language</code>
* headers that were encountered. If the request did not specify a
* preferred language, the server's default Locale is returned.
*/
public Enumeration getLocales() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0)
return (new Enumerator(locales));
ArrayList results = new ArrayList();
results.add(defaultLocale);
return (new Enumerator(results));
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Return the set of preferred Locales that the client will accept
* content in, based on the values for any <code>Accept-Language</code>
* headers that were encountered. If the request did not specify a
* preferred language, the server's default Locale is returned.
*/
public Enumeration getLocales() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0)
return (new Enumerator(locales));
ArrayList results = new ArrayList();
results.add(defaultLocale);
return (new Enumerator(results));
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Return the set of preferred Locales that the client will accept
* content in, based on the values for any <code>Accept-Language</code>
* headers that were encountered. If the request did not specify a
* preferred language, the server's default Locale is returned.
*/
@Override
public Enumeration<Locale> getLocales() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0)
return (new Enumerator<Locale>(locales));
ArrayList<Locale> results = new ArrayList<Locale>();
results.add(defaultLocale);
return new Enumerator<Locale>(results);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Return the set of preferred Locales that the client will accept
* content in, based on the values for any <code>Accept-Language</code>
* headers that were encountered. If the request did not specify a
* preferred language, the server's default Locale is returned.
*/
@Override
public Enumeration<Locale> getLocales() {
if (!localesParsed)
parseLocales();
if (locales.size() > 0)
return (new Enumerator<Locale>(locales));
ArrayList<Locale> results = new ArrayList<Locale>();
results.add(defaultLocale);
return new Enumerator<Locale>(results);
}
内容来源于网络,如有侵权,请联系作者删除!