📄 httpservletresponse.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Apr 04 16:56:25 PST 2003 --><TITLE>: Interface HttpServletResponse</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/servlet/http/HttpServletRequest.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/servlet/http/HttpSession.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="HttpServletResponse.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.servlet.http</FONT><BR>Interface HttpServletResponse</H2><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../javax/servlet/http/HttpServletResponseWrapper.html">HttpServletResponseWrapper</A></DD></DL><HR><DL><DT>public interface <B>HttpServletResponse</B><DT>extends <A HREF="../../../javax/servlet/ServletResponse.html">ServletResponse</A></DL><P>Extends the <A HREF="../../../javax/servlet/ServletResponse.html"><CODE>ServletResponse</CODE></A> interface to provide HTTP-specific functionality in sending a response. For example, it has methods to access HTTP headers and cookies. <p>The servlet container creates an <code>HttpServletRequest</code> object and passes it as an argument to the servlet's service methods (<code>doGet</code>, <code>doPost</code>, etc).<P><DL><DT><B>See Also: </B><DD><A HREF="../../../javax/servlet/ServletResponse.html"><CODE>ServletResponse</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></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_ACCEPTED">SC_ACCEPTED</A></B></CODE><BR> Status code (202) indicating that a request was accepted for processing, but was not completed.</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_BAD_GATEWAY">SC_BAD_GATEWAY</A></B></CODE><BR> Status code (502) indicating that the HTTP server received an invalid response from a server it consulted when acting as a proxy or gateway.</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_BAD_REQUEST">SC_BAD_REQUEST</A></B></CODE><BR> Status code (400) indicating the request sent by the client was syntactically incorrect.</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_CONFLICT">SC_CONFLICT</A></B></CODE><BR> Status code (409) indicating that the request could not be completed due to a conflict with the current state of 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_CONTINUE">SC_CONTINUE</A></B></CODE><BR> Status code (100) indicating the client can continue.</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_CREATED">SC_CREATED</A></B></CODE><BR> Status code (201) indicating the request succeeded and created a new resource 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_EXPECTATION_FAILED">SC_EXPECTATION_FAILED</A></B></CODE><BR> Status code (417) indicating that the server could not meet the expectation given in the Expect request 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_FORBIDDEN">SC_FORBIDDEN</A></B></CODE><BR> Status code (403) indicating the server understood the request but refused to fulfill it.</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_FOUND">SC_FOUND</A></B></CODE><BR> Status code (302) indicating that the resource reside 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_GATEWAY_TIMEOUT">SC_GATEWAY_TIMEOUT</A></B></CODE><BR> Status code (504) indicating that the server did not receive a timely response from the upstream server while acting as a gateway or 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_GONE">SC_GONE</A></B></CODE><BR> Status code (410) indicating that the resource is no longer available at the server and no forwarding address is known.</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_HTTP_VERSION_NOT_SUPPORTED">SC_HTTP_VERSION_NOT_SUPPORTED</A></B></CODE><BR> Status code (505) indicating that the server does not support or refuses to support the HTTP protocol version that was used in the request message.</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_INTERNAL_SERVER_ERROR">SC_INTERNAL_SERVER_ERROR</A></B></CODE><BR> Status code (500) indicating an error inside the HTTP server which prevented it from fulfilling 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_LENGTH_REQUIRED">SC_LENGTH_REQUIRED</A></B></CODE><BR> Status code (411) indicating that the request cannot be handled without a defined <code><em>Content-Length</em></code>.</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_METHOD_NOT_ALLOWED">SC_METHOD_NOT_ALLOWED</A></B></CODE><BR> Status code (405) indicating that the method specified in the <code><em>Request-Line</em></code> is not allowed for the resource identified by the <code><em>Request-URI</em></code>.</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_MOVED_PERMANENTLY">SC_MOVED_PERMANENTLY</A></B></CODE><BR> 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.</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_MOVED_TEMPORARILY">SC_MOVED_TEMPORARILY</A></B></CODE><BR> 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.</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_MULTIPLE_CHOICES">SC_MULTIPLE_CHOICES</A></B></CODE><BR> Status code (300) indicating that the requested resource corresponds to any one of a set of representations, each with its own specific location.</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_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 headerssent 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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -