java API

The response's character encoding is only set from the given content type if this method is called before getWriter is called.是什么意思

setContentType
void setContentType(String type)Sets the content type of the response being sent to the client, if the response has not been committed yet. The given content type may include a character encoding specification, for example, text/html;charset=UTF-8. The response's character encoding is only set from the given content type if this method is called before getWriter is called.
This method may be called repeatedly to change content type and character encoding. This method has no effect if called after the response has been committed. It does not set the response's character encoding if it is called after getWriter has been called or after the response has been committed.

Containers must communicate the content type and the character encoding used for the servlet response's writer to the client if the protocol provides a way for doing so. In the case of HTTP, the Content-Type header is used.

反应的字符编码是唯一一套由特定的内容类型,如果这种方法被称为前getWriter被称为。

setContentType
void setContentType (String type)集的内容类型的反应被发送到客户端,如果反应并不一直致力于尚未。提供的内容类型可包括字符编码规范,为例如, text / html ;字符集= UTF - 8的。反应的字符编码是唯一一套由特定的内容类型,如果这种方法被称为前getWriter被称为。

这种方法可称为一再变更的内容类型和字符编码。这种方法没有任何影响,如果所谓的答复后,一直致力于。它没有设定回应的字符编码,如果它被称为后getWriter被称为或之后的反应一直致力于。

容器必须交流的内容类型和字符编码用于服务器响应的作家到用户端,如果该议定书提供了一种这样做的。在案件的HTTP ,内容类型标头的使用。

http://gceclub.sun.com.cn/chinese_java_docs.html
api中文文档下载地址
温馨提示:答案为网友推荐,仅供参考
第1个回答  2008-12-27
一楼是用工具译过来的,什么乱七八糟的东西。你不会english就去找个中文文档嘛!你就用JDK1.5的中文文档,baidu一搜就有。
第2个回答  2008-12-27
以后碰到英文不懂的时候 可以上
(翻译得很不错)
进行翻译,当然不可能100%完全正确, 不过加上自己的理解, 就可以明白的

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网