📄 httpservletresponse.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NO_CONTENT">SC_NO_CONTENT</A></B></CODE><BR> Status code (204) indicating that the request succeeded but that there was no new information to return.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NON_AUTHORITATIVE_INFORMATION">SC_NON_AUTHORITATIVE_INFORMATION</A></B></CODE><BR> Status code (203) indicating that the meta information presented by the client did not originate from the server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NOT_ACCEPTABLE">SC_NOT_ACCEPTABLE</A></B></CODE><BR> Status code (406) indicating that the resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NOT_FOUND">SC_NOT_FOUND</A></B></CODE><BR> Status code (404) indicating that the requested resource is not available.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NOT_IMPLEMENTED">SC_NOT_IMPLEMENTED</A></B></CODE><BR> Status code (501) indicating the HTTP server does not support the functionality needed to fulfill the request.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NOT_MODIFIED">SC_NOT_MODIFIED</A></B></CODE><BR> Status code (304) indicating that a conditional GET operation found that the resource was available and not modified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_OK">SC_OK</A></B></CODE><BR> Status code (200) indicating the request succeeded normally.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_PARTIAL_CONTENT">SC_PARTIAL_CONTENT</A></B></CODE><BR> Status code (206) indicating that the server has fulfilled the partial GET request for the resource.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_PAYMENT_REQUIRED">SC_PAYMENT_REQUIRED</A></B></CODE><BR> Status code (402) reserved for future use.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_PRECONDITION_FAILED">SC_PRECONDITION_FAILED</A></B></CODE><BR> Status code (412) indicating that the precondition given in one or more of the request-header fields evaluated to false when it was tested on the server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_PROXY_AUTHENTICATION_REQUIRED">SC_PROXY_AUTHENTICATION_REQUIRED</A></B></CODE><BR> Status code (407) indicating that the client <em>MUST</em> first authenticate itself with the proxy.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_REQUEST_ENTITY_TOO_LARGE">SC_REQUEST_ENTITY_TOO_LARGE</A></B></CODE><BR> Status code (413) indicating that the server is refusing to process the request because the request entity is larger than the server is willing or able to process.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_REQUEST_TIMEOUT">SC_REQUEST_TIMEOUT</A></B></CODE><BR> Status code (408) indicating that the client did not produce a request within the time that the server was prepared to wait.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_REQUEST_URI_TOO_LONG">SC_REQUEST_URI_TOO_LONG</A></B></CODE><BR> Status code (414) indicating that the server is refusing to service the request because the <code><em>Request-URI</em></code> is longer than the server is willing to interpret.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_REQUESTED_RANGE_NOT_SATISFIABLE">SC_REQUESTED_RANGE_NOT_SATISFIABLE</A></B></CODE><BR> Status code (416) indicating that the server cannot serve the requested byte range.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_RESET_CONTENT">SC_RESET_CONTENT</A></B></CODE><BR> Status code (205) indicating that the agent <em>SHOULD</em> reset the document view which caused the request to be sent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_SEE_OTHER">SC_SEE_OTHER</A></B></CODE><BR> Status code (303) indicating that the response to the request can be found under a different URI.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_SERVICE_UNAVAILABLE">SC_SERVICE_UNAVAILABLE</A></B></CODE><BR> Status code (503) indicating that the HTTP server is temporarily overloaded, and unable to handle the request.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_SWITCHING_PROTOCOLS">SC_SWITCHING_PROTOCOLS</A></B></CODE><BR> Status code (101) indicating the server is switching protocols according to Upgrade header.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_TEMPORARY_REDIRECT">SC_TEMPORARY_REDIRECT</A></B></CODE><BR> Status code (307) indicating that the requested resource resides temporarily under a different URI. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_UNAUTHORIZED">SC_UNAUTHORIZED</A></B></CODE><BR> Status code (401) indicating that the request requires HTTP authentication.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_UNSUPPORTED_MEDIA_TYPE">SC_UNSUPPORTED_MEDIA_TYPE</A></B></CODE><BR> Status code (415) indicating that the server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_USE_PROXY">SC_USE_PROXY</A></B></CODE><BR> Status code (305) indicating that the requested resource <em>MUST</em> be accessed through the proxy given by the <code><em>Location</em></code> field.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#addCookie(javax.servlet.http.Cookie)">addCookie</A></B>(<A HREF="../../../javax/servlet/http/Cookie.html" title="class in javax.servlet.http">Cookie</A> cookie)</CODE><BR> Adds the specified cookie to the response. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#addDateHeader(java.lang.String, long)">addDateHeader</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, long date)</CODE><BR> Adds a response header with the given name and date-value. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#addHeader(java.lang.String, java.lang.String)">addHeader</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</CODE><BR> Adds a response header with the given name and value. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#addIntHeader(java.lang.String, int)">addIntHeader</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, int value)</CODE><BR> Adds a response header with the given name and integer value. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#containsHeader(java.lang.String)">containsHeader</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE><BR> Returns a boolean indicating whether the named response header has already been set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#encodeRedirectUrl(java.lang.String)">encodeRedirectUrl</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> url)</CODE><BR> <B>Deprecated.</B> <I>As of version 2.1, use encodeRedirectURL(String url) instead</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#encodeRedirectURL(java.lang.String)">encodeRedirectURL</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> url)</CODE><BR> Encodes the specified URL for use in the <code>sendRedirect</code> method or, if encoding is not needed, returns the URL unchanged. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#encodeUrl(java.lang.String)">encodeUrl</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> url)</CODE><BR> <B>Deprecated.</B> <I>As of version 2.1, use encodeURL(String url) instead</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -