本文整理了Java中org.apache.catalina.Context.getCharset()
方法的一些代码示例,展示了Context.getCharset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.getCharset()
方法的具体详情如下:
包路径:org.apache.catalina.Context
类名称:Context
方法名:getCharset
[英]Obtain the character set name to use with the given Locale. Note that different Contexts may have different mappings of Locale to character set.
[中]获取用于给定区域设置的字符集名称。请注意,不同的上下文可能具有不同的区域设置到字符集的映射。
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Set the Locale that is appropriate for this response, including
* setting the appropriate character encoding.
*
* @param locale The new locale
*/
@Override
public void setLocale(Locale locale) {
if (isCommitted()) {
return;
}
// Ignore any call from an included servlet
if (included) {
return;
}
coyoteResponse.setLocale(locale);
// Ignore any call made after the getWriter has been invoked.
// The default should be used
if (usingWriter) {
return;
}
if (isCharacterEncodingSet) {
return;
}
String charset = getContext().getCharset(locale);
if (charset != null) {
coyoteResponse.setCharacterEncoding(charset);
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Set the Locale that is appropriate for this response, including
* setting the appropriate character encoding.
*
* @param locale The new locale
*/
@Override
public void setLocale(Locale locale) {
if (isCommitted()) {
return;
}
// Ignore any call from an included servlet
if (included) {
return;
}
coyoteResponse.setLocale(locale);
// Ignore any call made after the getWriter has been invoked.
// The default should be used
if (usingWriter) {
return;
}
if (isCharacterEncodingSet) {
return;
}
String charset = getContext().getCharset(locale);
if (charset != null) {
coyoteResponse.setCharacterEncoding(charset);
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
String charset = context.getCharset(locale);
if (charset != null) {
try {
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
String charset = context.getCharset(locale);
if (charset != null) {
try {
内容来源于网络,如有侵权,请联系作者删除!