⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpservletresponse.html

📁 servlet-2_4-pfd3-doc.zip 您上载的源码为何会被站长不采用或帐号被删除?
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#setDateHeader(java.lang.String, long)">setDateHeader</A></B>(java.lang.String&nbsp;name,              long&nbsp;date)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets 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>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#setHeader(java.lang.String, java.lang.String)">setHeader</A></B>(java.lang.String&nbsp;name,          java.lang.String&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets 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>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#setIntHeader(java.lang.String, int)">setIntHeader</A></B>(java.lang.String&nbsp;name,             int&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets 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>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#setStatus(int)">setStatus</A></B>(int&nbsp;sc)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the status code for this response.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponse.html#setStatus(int, java.lang.String)">setStatus</A></B>(int&nbsp;sc,          java.lang.String&nbsp;sm)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>As of version 2.1, due to ambiguous meaning of the  message parameter. To set a status code  use <code>setStatus(int)</code>, to send an error with a description use <code>sendError(int, String)</code>. Sets the status code and message for this response.</I></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.servlet.ServletResponse"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.servlet.<A HREF="../../../javax/servlet/ServletResponse.html">ServletResponse</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/servlet/ServletResponse.html#flushBuffer()">flushBuffer</A>, <A HREF="../../../javax/servlet/ServletResponse.html#getBufferSize()">getBufferSize</A>, <A HREF="../../../javax/servlet/ServletResponse.html#getCharacterEncoding()">getCharacterEncoding</A>, <A HREF="../../../javax/servlet/ServletResponse.html#getContentType()">getContentType</A>, <A HREF="../../../javax/servlet/ServletResponse.html#getLocale()">getLocale</A>, <A HREF="../../../javax/servlet/ServletResponse.html#getOutputStream()">getOutputStream</A>, <A HREF="../../../javax/servlet/ServletResponse.html#getWriter()">getWriter</A>, <A HREF="../../../javax/servlet/ServletResponse.html#isCommitted()">isCommitted</A>, <A HREF="../../../javax/servlet/ServletResponse.html#reset()">reset</A>, <A HREF="../../../javax/servlet/ServletResponse.html#resetBuffer()">resetBuffer</A>, <A HREF="../../../javax/servlet/ServletResponse.html#setBufferSize(int)">setBufferSize</A>, <A HREF="../../../javax/servlet/ServletResponse.html#setCharacterEncoding(java.lang.String)">setCharacterEncoding</A>, <A HREF="../../../javax/servlet/ServletResponse.html#setContentLength(int)">setContentLength</A>, <A HREF="../../../javax/servlet/ServletResponse.html#setContentType(java.lang.String)">setContentType</A>, <A HREF="../../../javax/servlet/ServletResponse.html#setLocale(java.util.Locale)">setLocale</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="SC_CONTINUE"><!-- --></A><H3>SC_CONTINUE</H3><PRE>public static final int <B>SC_CONTINUE</B></PRE><DL><DD>Status code (100) indicating the client can continue.</DL><HR><A NAME="SC_SWITCHING_PROTOCOLS"><!-- --></A><H3>SC_SWITCHING_PROTOCOLS</H3><PRE>public static final int <B>SC_SWITCHING_PROTOCOLS</B></PRE><DL><DD>Status code (101) indicating the server is switching protocols according to Upgrade header.</DL><HR><A NAME="SC_OK"><!-- --></A><H3>SC_OK</H3><PRE>public static final int <B>SC_OK</B></PRE><DL><DD>Status code (200) indicating the request succeeded normally.</DL><HR><A NAME="SC_CREATED"><!-- --></A><H3>SC_CREATED</H3><PRE>public static final int <B>SC_CREATED</B></PRE><DL><DD>Status code (201) indicating the request succeeded and created a new resource on the server.</DL><HR><A NAME="SC_ACCEPTED"><!-- --></A><H3>SC_ACCEPTED</H3><PRE>public static final int <B>SC_ACCEPTED</B></PRE><DL><DD>Status code (202) indicating that a request was accepted for processing, but was not completed.</DL><HR><A NAME="SC_NON_AUTHORITATIVE_INFORMATION"><!-- --></A><H3>SC_NON_AUTHORITATIVE_INFORMATION</H3><PRE>public static final int <B>SC_NON_AUTHORITATIVE_INFORMATION</B></PRE><DL><DD>Status code (203) indicating that the meta information presented by the client did not originate from the server.</DL><HR><A NAME="SC_NO_CONTENT"><!-- --></A><H3>SC_NO_CONTENT</H3><PRE>public static final int <B>SC_NO_CONTENT</B></PRE><DL><DD>Status code (204) indicating that the request succeeded but that there was no new information to return.</DL><HR><A NAME="SC_RESET_CONTENT"><!-- --></A><H3>SC_RESET_CONTENT</H3><PRE>public static final int <B>SC_RESET_CONTENT</B></PRE><DL><DD>Status code (205) indicating that the agent <em>SHOULD</em> reset the document view which caused the request to be sent.</DL><HR><A NAME="SC_PARTIAL_CONTENT"><!-- --></A><H3>SC_PARTIAL_CONTENT</H3><PRE>public static final int <B>SC_PARTIAL_CONTENT</B></PRE><DL><DD>Status code (206) indicating that the server has fulfilled the partial GET request for the resource.</DL><HR><A NAME="SC_MULTIPLE_CHOICES"><!-- --></A><H3>SC_MULTIPLE_CHOICES</H3><PRE>public static final int <B>SC_MULTIPLE_CHOICES</B></PRE><DL><DD>Status code (300) indicating that the requested resource corresponds to any one of a set of representations, each with its own specific location.</DL><HR><A NAME="SC_MOVED_PERMANENTLY"><!-- --></A><H3>SC_MOVED_PERMANENTLY</H3><PRE>public static final int <B>SC_MOVED_PERMANENTLY</B></PRE><DL><DD>Status code (301) indicating that the resource has permanently moved to a new location, and that future references should use a new URI with their requests.</DL><HR><A NAME="SC_MOVED_TEMPORARILY"><!-- --></A><H3>SC_MOVED_TEMPORARILY</H3><PRE>public static final int <B>SC_MOVED_TEMPORARILY</B></PRE><DL><DD>Status code (302) indicating that the resource has temporarily moved to another location, but that future references should still use the original URI to access the resource. This variable is for a compatibility with existing servlets.</DL><HR><A NAME="SC_FOUND"><!-- --></A><H3>SC_FOUND</H3><PRE>public static final int <B>SC_FOUND</B></PRE><DL><DD>Status code (302) indicating that the resource reside temporarily under a different URI. Since the redirection might be altered on occasion, the client should continue to use the Request-URI for future requests.(HTTP/1.1) To represent the status code (302), it is recommended to use this variable.</DL><HR><A NAME="SC_SEE_OTHER"><!-- --></A><H3>SC_SEE_OTHER</H3><PRE>public static final int <B>SC_SEE_OTHER</B></PRE><DL><DD>Status code (303) indicating that the response to the request can be found under a different URI.</DL><HR><A NAME="SC_NOT_MODIFIED"><!-- --></A><H3>SC_NOT_MODIFIED</H3><PRE>public static final int <B>SC_NOT_MODIFIED</B></PRE><DL><DD>Status code (304) indicating that a conditional GET operation found that the resource was available and not modified.</DL><HR><A NAME="SC_USE_PROXY"><!-- --></A><H3>SC_USE_PROXY</H3><PRE>public static final int <B>SC_USE_PROXY</B></PRE><DL><DD>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.</DL><HR><A NAME="SC_TEMPORARY_REDIRECT"><!-- --></A><H3>SC_TEMPORARY_REDIRECT</H3><PRE>public static final int <B>SC_TEMPORARY_REDIRECT</B></PRE><DL><DD>Status code (307) indicating that the requested resource  resides temporarily under a different URI. The temporary URI <em>SHOULD</em> be given by the <code><em>Location</em></code>  field in the response.</DL><HR><A NAME="SC_BAD_REQUEST"><!-- --></A><H3>SC_BAD_REQUEST</H3><PRE>public static final int <B>SC_BAD_REQUEST</B></PRE><DL><DD>Status code (400) indicating the request sent by the client was syntactically incorrect.</DL><HR><A NAME="SC_UNAUTHORIZED"><!-- --></A><H3>SC_UNAUTHORIZED</H3><PRE>public static final int <B>SC_UNAUTHORIZED</B></PRE><DL><DD>Status code (401) indicating that the request requires HTTP authentication.</DL><HR><A NAME="SC_PAYMENT_REQUIRED"><!-- --></A><H3>SC_PAYMENT_REQUIRED</H3><PRE>public static final int <B>SC_PAYMENT_REQUIRED</B></PRE><DL><DD>Status code (402) reserved for future use.</DL><HR><A NAME="SC_FORBIDDEN"><!-- --></A><H3>SC_FORBIDDEN</H3><PRE>public static final int <B>SC_FORBIDDEN</B></PRE><DL><DD>Status code (403) indicating the server understood the request but refused to fulfill it.</DL><HR><A NAME="SC_NOT_FOUND"><!-- --></A><H3>SC_NOT_FOUND</H3><PRE>public static final int <B>SC_NOT_FOUND</B></PRE><DL><DD>Status code (404) indicating that the requested resource is not available.</DL><HR><A NAME="SC_METHOD_NOT_ALLOWED"><!-- --></A><H3>SC_METHOD_NOT_ALLOWED</H3><PRE>public static final int <B>SC_METHOD_NOT_ALLOWED</B></PRE><DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -