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

📄 mimeresponse.html.svn-base

📁 portal越来越流行了
💻 SVN-BASE
📖 第 1 页 / 共 3 页
字号:
<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/portlet/MimeResponse.html#setContentType(java.lang.String)">setContentType</A></B>(java.lang.String&nbsp;type)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the MIME type for the response.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.portlet.PortletResponse"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from interface javax.portlet.<A HREF="../../javax/portlet/PortletResponse.html" title="interface in javax.portlet">PortletResponse</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javax/portlet/PortletResponse.html#addProperty(javax.servlet.http.Cookie)">addProperty</A>, <A HREF="../../javax/portlet/PortletResponse.html#addProperty(java.lang.String, org.w3c.dom.Element)">addProperty</A>, <A HREF="../../javax/portlet/PortletResponse.html#addProperty(java.lang.String, java.lang.String)">addProperty</A>, <A HREF="../../javax/portlet/PortletResponse.html#createElement(java.lang.String)">createElement</A>, <A HREF="../../javax/portlet/PortletResponse.html#encodeURL(java.lang.String)">encodeURL</A>, <A HREF="../../javax/portlet/PortletResponse.html#getNamespace()">getNamespace</A>, <A HREF="../../javax/portlet/PortletResponse.html#setProperty(java.lang.String, java.lang.String)">setProperty</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_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>Field Detail</B></FONT></TH></TR></TABLE><A NAME="EXPIRATION_CACHE"><!-- --></A><H3>EXPIRATION_CACHE</H3><PRE>static final java.lang.String <B>EXPIRATION_CACHE</B></PRE><DL><DD>Property to set the expiration time in seconds for this response using the <code>setProperty</code> method intended to be used in  forwarded or included servlets/JSPs. <P> If the expiration value is set to <code>0</code>, caching is disabled for this portlet; if the value is set to <code>-1</code>, the cache does not expire. <p> A default can be defined in the portlet deployment descriptor with the <code>expiration-cache<code> tag, otherwise it is <code>0</code>. <p> Non-integer values are treated as <code>0</code>. <p> The value is <code>"portlet.expiration-cache"</code>.<P><DL><DT><B>See Also:</B><DD><A HREF="../../javax/portlet/CacheControl.html" title="interface in javax.portlet"><CODE>CacheControl</CODE></A>, <A HREF="../../constant-values.html#javax.portlet.MimeResponse.EXPIRATION_CACHE">Constant Field Values</A></DL></DL><HR><A NAME="CACHE_SCOPE"><!-- --></A><H3>CACHE_SCOPE</H3><PRE>static final java.lang.String <B>CACHE_SCOPE</B></PRE><DL><DD>Property to set the cache scope for this response using the <code>setProperty</code> method intended to be used in  forwarded or included servlets/JSPs. <P> Predefined cache scopes are: <code>PUBLIC_SCOPE</code> and <code>PRIVATE_SCOPE</code>. <p> A default can be defined in the portlet deployment descriptor with the <code>cache-scope<code> tag, otherwise it is <code>PRIVATE_SCOPE</code>. <p> Values that are not either <code>PUBLIC_SCOPE</code> or <code>PRIVATE_SCOPE</code> are treated as <code>PRIVATE_SCOPE</code>. <p> The value is <code>"portlet.cache-scope"</code>.<P><DL><DT><B>Since:</B></DT>  <DD>2.0</DD><DT><B>See Also:</B><DD><A HREF="../../javax/portlet/CacheControl.html" title="interface in javax.portlet"><CODE>CacheControl</CODE></A>, <A HREF="../../constant-values.html#javax.portlet.MimeResponse.CACHE_SCOPE">Constant Field Values</A></DL></DL><HR><A NAME="PUBLIC_SCOPE"><!-- --></A><H3>PUBLIC_SCOPE</H3><PRE>static final java.lang.String <B>PUBLIC_SCOPE</B></PRE><DL><DD>Public cache scope, indicating that the cache entry can be shared across users. The value is <code>"portlet.public-scope"</code>.<P><DL><DT><B>Since:</B></DT>  <DD>2.0</DD><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.portlet.MimeResponse.PUBLIC_SCOPE">Constant Field Values</A></DL></DL><HR><A NAME="PRIVATE_SCOPE"><!-- --></A><H3>PRIVATE_SCOPE</H3><PRE>static final java.lang.String <B>PRIVATE_SCOPE</B></PRE><DL><DD>Private cache scope, indicating that the cache entry must not be shared across users. The value is <code>"portlet.private-scope"</code>.<P><DL><DT><B>Since:</B></DT>  <DD>2.0</DD><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.portlet.MimeResponse.PRIVATE_SCOPE">Constant Field Values</A></DL></DL><HR><A NAME="ETAG"><!-- --></A><H3>ETAG</H3><PRE>static final java.lang.String <B>ETAG</B></PRE><DL><DD>Property to tell the portlet container the new ETag for this response intended to be used in forwarded or included servlets/JSPs. <p> This property needs to be set using the <code>setProperty</code> method.  <P> The value is <code>"portlet.ETag "</code>.<P><DL><DT><B>Since:</B></DT>  <DD>2.0</DD><DT><B>See Also:</B><DD><A HREF="../../javax/portlet/CacheControl.html" title="interface in javax.portlet"><CODE>CacheControl</CODE></A>, <A HREF="../../constant-values.html#javax.portlet.MimeResponse.ETAG">Constant Field Values</A></DL></DL><HR><A NAME="USE_CACHED_CONTENT"><!-- --></A><H3>USE_CACHED_CONTENT</H3><PRE>static final java.lang.String <B>USE_CACHED_CONTENT</B></PRE><DL><DD>Property to tell the portlet container to use the cached markup for the validation token provided in the request. This property  needs to be set using the <code>setProperty</code> method with a non-null value and is intended to be used in forwarded or included servlets/JSPs. The value itself is not evaluated.  <P> The value is <code>"portlet.use-cached-content "</code>.<P><DL><DT><B>Since:</B></DT>  <DD>2.0</DD><DT><B>See Also:</B><DD><A HREF="../../javax/portlet/CacheControl.html" title="interface in javax.portlet"><CODE>CacheControl</CODE></A>, <A HREF="../../constant-values.html#javax.portlet.MimeResponse.USE_CACHED_CONTENT">Constant Field Values</A></DL></DL><HR><A NAME="NAMESPACED_RESPONSE"><!-- --></A><H3>NAMESPACED_RESPONSE</H3><PRE>static final java.lang.String <B>NAMESPACED_RESPONSE</B></PRE><DL><DD>Property intended to be a hint to the portal application that the returned  content is completely namespaced.  This includes all markup id elements, form fields, etc. One example where this is might be used is for portal applications that are form-based and thus need to re-write any forms included in the portlet markup.  <p> This property  needs to be set using the <code>setProperty</code> method with a non-null value. The value itself is not evaluated.  <p> The value is <code>"X-JAVAX-PORTLET-NAMESPACED-RESPONSE"</code>.<P><DL><DT><B>Since:</B></DT>  <DD>2.0</DD><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.portlet.MimeResponse.NAMESPACED_RESPONSE">Constant Field Values</A></DL></DL><HR><A NAME="MARKUP_HEAD_ELEMENT"><!-- --></A><H3>MARKUP_HEAD_ELEMENT</H3><PRE>static final java.lang.String <B>MARKUP_HEAD_ELEMENT</B></PRE><DL><DD>Property intended to be a hint to the portal application that the provided DOM element should be added to the markup head section of the response to the client. <p> Support for this property is optional and the portlet can verify if the calling portal supports this property via the <code>MARKUP_HEAD_ELEMENT_SUPPORT</code> property on the <code>PortalContext</code>. <p> Even if the calling portal support this property delivery of the DOM element to the client cannot be guaranteed, e.g. due to possible security rules of the portal application or elements that conflict with the response of other portlets. <p> This property  needs to be set using the  <code>setProperty(String key,org.w3c.dom.Element element)</code> method. <p> The value is <code>"javax.portlet.markup.head.element"</code>.<P><DL><DT><B>Since:</B></DT>  <DD>2.0</DD><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javax.portlet.MimeResponse.MARKUP_HEAD_ELEMENT">Constant Field Values</A></DL></DL><!-- ============ 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="getContentType()"><!-- --></A><H3>getContentType</H3><PRE>java.lang.String <B>getContentType</B>()</PRE><DL><DD>Returns the MIME type that can be used to contribute markup to the render response. <p> If no content type was set previously using the <A HREF="../../javax/portlet/MimeResponse.html#setContentType(java.lang.String)"><CODE>setContentType(java.lang.String)</CODE></A> method this method returns <code>null</code>.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the MIME type of the response, or <code>null</code> if no         content type is set<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/MimeResponse.html#setContentType(java.lang.String)"><CODE>setContentType(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="setContentType(java.lang.String)"><!-- --></A><H3>setContentType</H3><PRE>void <B>setContentType</B>(java.lang.String&nbsp;type)</PRE><DL><DD>Sets the MIME type for the response. The portlet should set the content type before calling <A HREF="../../javax/portlet/MimeResponse.html#getWriter()"><CODE>getWriter()</CODE></A> or <A HREF="../../javax/portlet/MimeResponse.html#getPortletOutputStream()"><CODE>getPortletOutputStream()</CODE></A>. If the content type is not  the <A HREF="../../javax/portlet/PortletRequest.html#getResponseContentType()"><CODE>PortletRequest.getResponseContentType()</CODE></A> value is set as response content type by the portlet container. <p> Calling <code>setContentType</code> after <code>getWriter</code> or <code>getOutputStream</code> does not change the content type. <p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - the content MIME type<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/PortletRequest.html#getResponseContentTypes()"><CODE>PortletRequest.getResponseContentTypes()</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#getContentType()"><CODE>getContentType()</CODE></A></DL></DD></DL><HR><A NAME="getCharacterEncoding()"><!-- --></A><H3>getCharacterEncoding</H3><PRE>java.lang.String <B>getCharacterEncoding</B>()</PRE><DL><DD>Returns the name of the charset used for the MIME body sent in this response.  <p> See <a href="http://ds.internic.net/rfc/rfc2045.txt">RFC 2047</a> for more information about character encoding and MIME.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>String</code> specifying the name of the charset, for         example, <code>ISO-8859-1</code></DL></DD></DL><HR><A NAME="getWriter()"><!-- --></A><H3>getWriter</H3><PRE>java.io.PrintWriter <B>getWriter</B>()                              throws java.io.IOException</PRE><DL><DD>Returns a PrintWriter object that can send character text to the portal. <p> Before calling this method the content type of the render response should be set using the <A HREF="../../javax/portlet/MimeResponse.html#setContentType(java.lang.String)"><CODE>setContentType(java.lang.String)</CODE></A> method. <p> Either this method or <A HREF="../../javax/portlet/MimeResponse.html#getPortletOutputStream()"><CODE>getPortletOutputStream()</CODE></A> may be called to write the body, not both.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>PrintWriter</code> object that can return character         data to the portal<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an input or output exception occurred<DD><CODE>java.lang.IllegalStateException</CODE> - if the <code>getPortletOutputStream</code> method has                been called on this response.<DT><B>See Also:</B><DD><A HREF="../../javax/portlet/MimeResponse.html#setContentType(java.lang.String)"><CODE>setContentType(java.lang.String)</CODE></A>, <A HREF="../../javax/portlet/MimeResponse.html#getPortletOutputStream()"><CODE>getPortletOutputStream()</CODE></A></DL></DD></DL><HR><A NAME="getLocale()"><!-- --></A><H3>getLocale</H3><PRE>java.util.Locale <B>getLocale</B>()</PRE><DL><DD>Returns the locale assigned to the response.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Locale of this response</DL></DD></DL><HR><A NAME="setBufferSize(int)"><!-- --></A><H3>

⌨️ 快捷键说明

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