?? httpservletresponsewrapper.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 Mon Sep 29 15:11:56 PDT 2003 --><TITLE>: Class HttpServletResponseWrapper</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/HttpServletRequestWrapper.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/servlet/http/HttpSessionBindingEvent.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="HttpServletResponseWrapper.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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>Class HttpServletResponseWrapper</H2><PRE>java.lang.Object | +--<A HREF="../../../javax/servlet/ServletResponseWrapper.html">javax.servlet.ServletResponseWrapper</A> | +--<B>javax.servlet.http.HttpServletResponseWrapper</B></PRE><HR><DL><DT>public class <B>HttpServletResponseWrapper</B><DT>extends <A HREF="../../../javax/servlet/ServletResponseWrapper.html">ServletResponseWrapper</A><DT>implements <A HREF="../../../javax/servlet/http/HttpServletResponse.html">HttpServletResponse</A></DL><P>Provides a convenient implementation of the HttpServletResponse interface that can be subclassed by developers wishing to adapt the response from a Servlet. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped response object.<P><DL><DT><B>Since: </B><DD>v 2.3</DD><DT><B>See Also: </B><DD><A HREF="../../../javax/servlet/http/HttpServletResponse.html"><CODE>HttpServletResponse</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_javax.servlet.http.HttpServletResponse"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface javax.servlet.http.<A HREF="../../../javax/servlet/http/HttpServletResponse.html">HttpServletResponse</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_ACCEPTED">SC_ACCEPTED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_BAD_GATEWAY">SC_BAD_GATEWAY</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_BAD_REQUEST">SC_BAD_REQUEST</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_CONFLICT">SC_CONFLICT</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_CONTINUE">SC_CONTINUE</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_CREATED">SC_CREATED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_EXPECTATION_FAILED">SC_EXPECTATION_FAILED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_FORBIDDEN">SC_FORBIDDEN</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_FOUND">SC_FOUND</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_GATEWAY_TIMEOUT">SC_GATEWAY_TIMEOUT</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_GONE">SC_GONE</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_HTTP_VERSION_NOT_SUPPORTED">SC_HTTP_VERSION_NOT_SUPPORTED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_INTERNAL_SERVER_ERROR">SC_INTERNAL_SERVER_ERROR</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_LENGTH_REQUIRED">SC_LENGTH_REQUIRED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_METHOD_NOT_ALLOWED">SC_METHOD_NOT_ALLOWED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_MOVED_PERMANENTLY">SC_MOVED_PERMANENTLY</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_MOVED_TEMPORARILY">SC_MOVED_TEMPORARILY</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_MULTIPLE_CHOICES">SC_MULTIPLE_CHOICES</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NO_CONTENT">SC_NO_CONTENT</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NON_AUTHORITATIVE_INFORMATION">SC_NON_AUTHORITATIVE_INFORMATION</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NOT_ACCEPTABLE">SC_NOT_ACCEPTABLE</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NOT_FOUND">SC_NOT_FOUND</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NOT_IMPLEMENTED">SC_NOT_IMPLEMENTED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_NOT_MODIFIED">SC_NOT_MODIFIED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_OK">SC_OK</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_PARTIAL_CONTENT">SC_PARTIAL_CONTENT</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_PAYMENT_REQUIRED">SC_PAYMENT_REQUIRED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_PRECONDITION_FAILED">SC_PRECONDITION_FAILED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_PROXY_AUTHENTICATION_REQUIRED">SC_PROXY_AUTHENTICATION_REQUIRED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_REQUEST_ENTITY_TOO_LARGE">SC_REQUEST_ENTITY_TOO_LARGE</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_REQUEST_TIMEOUT">SC_REQUEST_TIMEOUT</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_REQUEST_URI_TOO_LONG">SC_REQUEST_URI_TOO_LONG</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_REQUESTED_RANGE_NOT_SATISFIABLE">SC_REQUESTED_RANGE_NOT_SATISFIABLE</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_RESET_CONTENT">SC_RESET_CONTENT</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_SEE_OTHER">SC_SEE_OTHER</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_SERVICE_UNAVAILABLE">SC_SERVICE_UNAVAILABLE</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_SWITCHING_PROTOCOLS">SC_SWITCHING_PROTOCOLS</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_TEMPORARY_REDIRECT">SC_TEMPORARY_REDIRECT</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_UNAUTHORIZED">SC_UNAUTHORIZED</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_UNSUPPORTED_MEDIA_TYPE">SC_UNSUPPORTED_MEDIA_TYPE</A>, <A HREF="../../../javax/servlet/http/HttpServletResponse.html#SC_USE_PROXY">SC_USE_PROXY</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponseWrapper.html#HttpServletResponseWrapper(javax.servlet.http.HttpServletResponse)">HttpServletResponseWrapper</A></B>(<A HREF="../../../javax/servlet/http/HttpServletResponse.html">HttpServletResponse</A> response)</CODE><BR> Constructs a response adaptor wrapping the given response.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><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/HttpServletResponseWrapper.html#addCookie(javax.servlet.http.Cookie)">addCookie</A></B>(<A HREF="../../../javax/servlet/http/Cookie.html">Cookie</A> cookie)</CODE><BR> The default behavior of this method is to call addCookie(Cookie cookie) on the wrapped response object.</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/HttpServletResponseWrapper.html#addDateHeader(java.lang.String, long)">addDateHeader</A></B>(java.lang.String name, long date)</CODE><BR> The default behavior of this method is to call addDateHeader(String name, long date) on the wrapped response object.</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/HttpServletResponseWrapper.html#addHeader(java.lang.String, java.lang.String)">addHeader</A></B>(java.lang.String name, java.lang.String value)</CODE><BR> The default behavior of this method is to return addHeader(String name, String value) on the wrapped response object.</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/HttpServletResponseWrapper.html#addIntHeader(java.lang.String, int)">addIntHeader</A></B>(java.lang.String name, int value)</CODE><BR> The default behavior of this method is to call addIntHeader(String name, int value) on the wrapped response object.</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/HttpServletResponseWrapper.html#containsHeader(java.lang.String)">containsHeader</A></B>(java.lang.String name)</CODE><BR> The default behavior of this method is to call containsHeader(String name) on the wrapped response object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponseWrapper.html#encodeRedirectUrl(java.lang.String)">encodeRedirectUrl</A></B>(java.lang.String url)</CODE><BR> The default behavior of this method is to return encodeRedirectUrl(String url) on the wrapped response object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponseWrapper.html#encodeRedirectURL(java.lang.String)">encodeRedirectURL</A></B>(java.lang.String url)</CODE><BR> The default behavior of this method is to return encodeRedirectURL(String url) on the wrapped response object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponseWrapper.html#encodeUrl(java.lang.String)">encodeUrl</A></B>(java.lang.String url)</CODE><BR> The default behavior of this method is to call encodeUrl(String url) on the wrapped response object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletResponseWrapper.html#encodeURL(java.lang.String)">encodeURL</A></B>(java.lang.String url)</CODE><BR> The default behavior of this method is to call encodeURL(String url) on the wrapped response object.</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/HttpServletResponseWrapper.html#sendError(int)">sendError</A></B>(int sc)</CODE>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -