org.apache.coyote.Response.setLocale()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(138)

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

Response.setLocale介绍

[英]Called explicitly by user to set the Content-Language and the default encoding
[中]用户显式调用以设置内容语言和默认编码

代码示例

代码示例来源: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.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: 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.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: 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: 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: 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: 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);
  }
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

getCoyoteResponse().setLocale(locale);

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

getCoyoteResponse().setLocale(locale);

相关文章