實作了javax.servlet下的Filter介面 為什么會找不到這個方法呢

uj5u.com熱心網友回復:
uj5u.com熱心網友回復:
有人嗎

uj5u.com熱心網友回復:
版本的問題吧uj5u.com熱心網友回復:
/*** Sets the character encoding (MIME charset) of the response
* being sent to the client, for example, to UTF-8.
* If the character encoding has already been set by
* {@link #setContentType} or {@link #setLocale},
* this method overrides it.
* Calling {@link #setContentType} with the <code>String</code>
* of <code>text/html</code> and calling
* this method with the <code>String</code> of <code>UTF-8</code>
* is equivalent with calling
* <code>setContentType</code> with the <code>String</code> of
* <code>text/html; charset=UTF-8</code>.
* <p>This method can be called repeatedly to change the character
* encoding.
* This method has no effect if it is called after
* <code>getWriter</code> has been
* called or after the response has been committed.
* <p>Containers must communicate 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 character
* encoding is communicated as part of the <code>Content-Type</code>
* header for text media types. Note that the character encoding
* cannot be communicated via HTTP headers if the servlet does not
* specify a content type; however, it is still used to encode text
* written via the servlet response's writer.
*
* @param charset a String specifying only the character set
* defined by IANA Character Sets
* (http://www.iana.org/assignments/character-sets)
*
* @see #setContentType
* #setLocale
*
* @since 2.4
*
*/
public void setCharacterEncoding(String charset);
2.4以前的版本應該沒有
uj5u.com熱心網友回復:
強轉為HTTPServletResponse轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/74641.html
標籤:Web 開發
上一篇:sharding-proxy連接postgresql報錯:Cannot find JDBC type '2003'
下一篇:Java Jframe類的問題
