📄 portletresponse.html.svn-base
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0) on Wed Feb 06 17:53:06 CET 2008 --><TITLE>PortletResponse</TITLE><META NAME="keywords" CONTENT="javax.portlet.PortletResponse interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="PortletResponse";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="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="class-use/PortletResponse.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="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/portlet/PortletRequestDispatcher.html" title="interface in javax.portlet"><B>PREV CLASS</B></A> <A HREF="../../javax/portlet/PortletSecurityException.html" title="class in javax.portlet"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?javax/portlet/PortletResponse.html" target="_top"><B>FRAMES</B></A> <A HREF="PortletResponse.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.portlet</FONT><BR>Interface PortletResponse</H2><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../javax/portlet/ActionResponse.html" title="interface in javax.portlet">ActionResponse</A>, <A HREF="../../javax/portlet/EventResponse.html" title="interface in javax.portlet">EventResponse</A>, <A HREF="../../javax/portlet/MimeResponse.html" title="interface in javax.portlet">MimeResponse</A>, <A HREF="../../javax/portlet/RenderResponse.html" title="interface in javax.portlet">RenderResponse</A>, <A HREF="../../javax/portlet/ResourceResponse.html" title="interface in javax.portlet">ResourceResponse</A>, <A HREF="../../javax/portlet/StateAwareResponse.html" title="interface in javax.portlet">StateAwareResponse</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../javax/portlet/filter/ActionResponseWrapper.html" title="class in javax.portlet.filter">ActionResponseWrapper</A>, <A HREF="../../javax/portlet/filter/EventResponseWrapper.html" title="class in javax.portlet.filter">EventResponseWrapper</A>, <A HREF="../../javax/portlet/filter/PortletResponseWrapper.html" title="class in javax.portlet.filter">PortletResponseWrapper</A>, <A HREF="../../javax/portlet/filter/RenderResponseWrapper.html" title="class in javax.portlet.filter">RenderResponseWrapper</A>, <A HREF="../../javax/portlet/filter/ResourceResponseWrapper.html" title="class in javax.portlet.filter">ResourceResponseWrapper</A></DD></DL><HR><DL><DT><PRE>public interface <B>PortletResponse</B></DL></PRE><P>The <CODE>PortletResponse</CODE> defines the base interface to assist a portlet in creating and sending a response to the client. The portlet container uses specialized versions of this interface when invoking a portlet. The portlet container creates these objects and passes them as arguments to the portlet's <CODE>processAction, processEvent, serveResource</CODE> and <CODE>render</CODE> methods.<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../javax/portlet/ActionResponse.html" title="interface in javax.portlet"><CODE>ActionResponse</CODE></A>, <A HREF="../../javax/portlet/RenderResponse.html" title="interface in javax.portlet"><CODE>RenderResponse</CODE></A>, <A HREF="../../javax/portlet/EventResponse.html" title="interface in javax.portlet"><CODE>EventResponse</CODE></A>, <A HREF="../../javax/portlet/ResourceResponse.html" title="interface in javax.portlet"><CODE>ResourceResponse</CODE></A></DL><HR><P><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></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/portlet/PortletResponse.html#addProperty(javax.servlet.http.Cookie)">addProperty</A></B>(javax.servlet.http.Cookie cookie)</CODE><BR> Adds a HTTP Cookie property to the response.<br> The portlet should note that the cookie may not make it to the client, but may be stored at the portal.</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/portlet/PortletResponse.html#addProperty(java.lang.String, org.w3c.dom.Element)">addProperty</A></B>(java.lang.String key, org.w3c.dom.Element element)</CODE><BR> Adds an XML DOM element property 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/portlet/PortletResponse.html#addProperty(java.lang.String, java.lang.String)">addProperty</A></B>(java.lang.String key, java.lang.String value)</CODE><BR> Adds a String property to an existing key to be returned to the portal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> org.w3c.dom.Element</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/portlet/PortletResponse.html#createElement(java.lang.String)">createElement</A></B>(java.lang.String tagName)</CODE><BR> Creates an element of the type specified to be used in the <A HREF="../../javax/portlet/PortletResponse.html#addProperty(java.lang.String, org.w3c.dom.Element)"><CODE>addProperty(String,Element)</CODE></A> method.</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/portlet/PortletResponse.html#encodeURL(java.lang.String)">encodeURL</A></B>(java.lang.String path)</CODE><BR> Returns the encoded URL of the resource, like servlets, JSPs, images and other static files, at the given path.</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/portlet/PortletResponse.html#getNamespace()">getNamespace</A></B>()</CODE><BR> The value returned by this method should be prefixed or appended to elements, such as JavaScript variables or function names, to ensure they are unique in the context of the portal page.</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/portlet/PortletResponse.html#setProperty(java.lang.String, java.lang.String)">setProperty</A></B>(java.lang.String key, java.lang.String value)</CODE><BR> Sets a String property to be returned to the portal.</TD></TR></TABLE> <P><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="addProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>addProperty</H3><PRE>void <B>addProperty</B>(java.lang.String key, java.lang.String value)</PRE><DL><DD>Adds a String property to an existing key to be returned to the portal. If there are no property values already associated with the key, a new key is created. <p> This method allows response properties to have multiple values. <p> Response properties can be viewed as header values set for the portal application. If these header values are intended to be transmitted to the client they should be set before the response is committed.<P><DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -