org.apache.catalina.Context.getCharsetMapper()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中org.apache.catalina.Context.getCharsetMapper()方法的一些代码示例,展示了Context.getCharsetMapper()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.getCharsetMapper()方法的具体详情如下:
包路径:org.apache.catalina.Context
类名称:Context
方法名:getCharsetMapper

Context.getCharsetMapper介绍

[英]Return the Locale to character set mapper for this Context.
[中]返回此上下文的区域设置到字符集映射器。

代码示例

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * 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;
  }
  CharsetMapper cm = getContext().getCharsetMapper();
  String charset = cm.getCharset( locale );
  if ( charset != null ){
    coyoteResponse.setCharacterEncoding(charset);
  }
}

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

/*      */   public void setLocale(Locale locale)
/*      */   {
/*  801 */     if (isCommitted()) {
/*  802 */       return;
/*      */     }
/*      */ 
/*  805 */     if (this.included) {
/*  806 */       return;
/*      */     }
/*  808 */     this.coyoteResponse.setLocale(locale);
/*      */ 
/*  812 */     if (this.usingWriter) {
/*  813 */       return;
/*      */     }
/*  815 */     if (this.isCharacterEncodingSet) {
/*  816 */       return;
/*      */     }
/*      */ 
/*  819 */     CharsetMapper cm = getContext().getCharsetMapper();
/*  820 */     String charset = cm.getCharset(locale);
/*  821 */     if (charset != null)
/*  822 */       this.coyoteResponse.setCharacterEncoding(charset);
/*      */   }
/*      */

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Set the Locale that is appropriate for this response, including
 * setting the appropriate character encoding.
 *
 * @param locale The new locale
 */
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;
  }
  CharsetMapper cm = request.getContext().getCharsetMapper();
  String charset = cm.getCharset( locale );
  if ( charset != null ){
    coyoteResponse.setCharacterEncoding(charset);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * 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;
  }
  CharsetMapper cm = getContext().getCharsetMapper();
  String charset = cm.getCharset( locale );
  if ( charset != null ){
    coyoteResponse.setCharacterEncoding(charset);
  }
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Set the Locale that is appropriate for this response, including
 * setting the appropriate character encoding.
 *
 * @param locale The new locale
 */
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;
  }
  CharsetMapper cm = request.getContext().getCharsetMapper();
  String charset = cm.getCharset( locale );
  if ( charset != null ){
    coyoteResponse.setCharacterEncoding(charset);
  }
}

代码示例来源:origin: tomcat/catalina

/**
 * Set the Locale that is appropriate for this response, including
 * setting the appropriate character encoding.
 *
 * @param locale The new locale
 */
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;
  }
  CharsetMapper cm = getContext().getCharsetMapper();
  String charset = cm.getCharset( locale );
  if ( charset != null ){
    coyoteResponse.setCharacterEncoding(charset);
  }
}

代码示例来源:origin: org.glassfish.main.web/web-core

/**
 * Set the Locale that is appropriate for this response, including
 * setting the appropriate character encoding.
 *
 * @param locale The new locale
 */
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;
  }
  CharsetMapper cm = getContext().getCharsetMapper();
  String charset = cm.getCharset( locale );
  if ( charset != null ){
    coyoteResponse.setCharacterEncoding(charset);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * 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;
  }
  CharsetMapper cm = getContext().getCharsetMapper();
  String charset = cm.getCharset( locale );
  if ( charset != null ){
    coyoteResponse.setCharacterEncoding(charset);
  }
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.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;
  }
  CharsetMapper cm = getContext().getCharsetMapper();
  String charset = cm.getCharset( locale );
  if ( charset != null ){
    coyoteResponse.setCharacterEncoding(charset);
  }
}

相关文章

微信公众号

最新文章

更多

Context类方法