📄 portletcontext.html
字号:
</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="../../../../org/apache/jetspeed/portlet/PortletContext.html#setAttribute(java.lang.String, java.lang.Object)">setAttribute</A></B>(java.lang.String name, java.lang.Object value)</CODE><BR> <B>Deprecated.</B> Associates an attribute with the given name and value with this context.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.servlet.ServletContext"><!-- --></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.servlet.ServletContext</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>getContext, getMimeType, getNamedDispatcher, getRealPath, getRequestDispatcher, getResource, getResourcePaths, getServerInfo, getServlet, getServletContextName, getServletNames, getServlets, log, log, log</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getInitParameter(java.lang.String)"><!-- --></A><H3>getInitParameter</H3><PRE>public java.lang.String <B>getInitParameter</B>(java.lang.String name)</PRE><DL><DD><B>Deprecated.</B> <DD>Returns the value of the context-wide initialization parameter with the given name, or <CODE>null</CODE> if the parameter does not exist. <P> This method returns the same value as <CODE>ServletContext.getInitParameter(java.lang.String)</CODE> for a servlet in the same web application.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getInitParameter</CODE> in interface <CODE>javax.servlet.ServletContext</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the parameter name<DT><B>Returns:</B><DD>the parameter value, <BR> or <CODE>null</CODE> if it does not exist</DL></DD></DL><HR><A NAME="getInitParameterNames()"><!-- --></A><H3>getInitParameterNames</H3><PRE>public java.util.Enumeration <B>getInitParameterNames</B>()</PRE><DL><DD><B>Deprecated.</B> <DD>Returns the names of this contexts initialization parameters as an enumeration, or an empty enumeration if this context has no initialization parameters. <P> This method returns the same values as <CODE>ServletContext.getInitParameterNames()</CODE> for a servlet in the same web application.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getInitParameterNames</CODE> in interface <CODE>javax.servlet.ServletContext</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an enumeration of parameter names</DL></DD></DL><HR><A NAME="setAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>setAttribute</H3><PRE>public void <B>setAttribute</B>(java.lang.String name, java.lang.Object value)</PRE><DL><DD><B>Deprecated.</B> <DD>Associates an attribute with the given name and value with this context. <P> This method has the same effect as <CODE>ServletContext.setAttribute(java.lang.String, java.lang.Object)</CODE> for a servlet in the same web application.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>setAttribute</CODE> in interface <CODE>javax.servlet.ServletContext</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the attribute name<DD><CODE>value</CODE> - the attribute value</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>public java.lang.Object <B>getAttribute</B>(java.lang.String name)</PRE><DL><DD><B>Deprecated.</B> <DD>Returns the attribute value with the given name, or <CODE>null</CODE> if no such attribute exists. <P> This method returns the same value as <CODE>ServletContext.getAttribute(java.lang.String)</CODE> for a servlet in the same web application.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getAttribute</CODE> in interface <CODE>javax.servlet.ServletContext</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the attribute name<DT><B>Returns:</B><DD>the attribute value</DL></DD></DL><HR><A NAME="getAttributeNames()"><!-- --></A><H3>getAttributeNames</H3><PRE>public java.util.Enumeration <B>getAttributeNames</B>()</PRE><DL><DD><B>Deprecated.</B> <DD>Returns an enumeration of the attribute names that this portlet context is aware of. <P> This method returns the same values as <CODE>ServletContext.getAttributeNames()</CODE> for a servlet in the same web application.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getAttributeNames</CODE> in interface <CODE>javax.servlet.ServletContext</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an enumeration of attribute names</DL></DD></DL><HR><A NAME="removeAttribute(java.lang.String)"><!-- --></A><H3>removeAttribute</H3><PRE>public void <B>removeAttribute</B>(java.lang.String name)</PRE><DL><DD><B>Deprecated.</B> <DD>Removes the attribute with the given name. <P> This method has the same effect as <CODE>ServletContext.removeAttribute(java.lang.String)</CODE> for a servlet in the same web application.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>removeAttribute</CODE> in interface <CODE>javax.servlet.ServletContext</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of attribute to be removed</DL></DD></DL><HR><A NAME="include(java.lang.String, org.apache.jetspeed.portlet.PortletRequest, org.apache.jetspeed.portlet.PortletResponse)"><!-- --></A><H3>include</H3><PRE>public void <B>include</B>(java.lang.String path, <A HREF="../../../../org/apache/jetspeed/portlet/PortletRequest.html" title="interface in org.apache.jetspeed.portlet">PortletRequest</A> request, <A HREF="../../../../org/apache/jetspeed/portlet/PortletResponse.html" title="interface in org.apache.jetspeed.portlet">PortletResponse</A> response) throws <A HREF="../../../../org/apache/jetspeed/portlet/PortletException.html" title="class in org.apache.jetspeed.portlet">PortletException</A>, java.io.IOException</PRE><DL><DD><B>Deprecated.</B> <DD>Allows the portlet to delegate the rendering to another resource as specified by the given path. The path has to be relative and will be resolved by this method, so that the portlet's resources are accessed. <P> To access protected resources the path has to be prefixed with /WEB-INF/ (e.g. /WEB-INF/myportlet/myportlet.jsp). Otherwise, the direct path is used. (e.g. /myportlet/myportlet.jsp). <P> This method is enabled for multi-language and multi-device support. For example, a jsp file "/myportlet/mytemplate.jsp" will be searched for in the following order, when accessing via HTML-Browser: <OL> <LI>/myportlet/html/en_US/mytemplate.jsp <LI>/myportlet/html/en/mytemplate.jsp <LI>/myportlet/html/mytemplate.jsp <LI>/myportlet/mytemplate.jsp </OL><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>path</CODE> - the path of the delegate resource<DD><CODE>request</CODE> - the portlet request<DD><CODE>response</CODE> - the portlet response<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/apache/jetspeed/portlet/PortletException.html" title="class in org.apache.jetspeed.portlet">PortletException</A></CODE> - if the delegated resource has trouble fulfilling the rendering request<DD><CODE>java.io.IOException</CODE> - if the streaming causes an I/O problem</DL></DD></DL><HR><A NAME="getResourceAsStream(java.lang.String)"><!-- --></A><H3>getResourceAsStream</H3><PRE>public java.io.InputStream <B>getResourceAsStream</B>(java.lang.String path)</PRE><DL><DD><B>Deprecated.</B> <DD>Returns the resource located at the given path as an <CODE>InputStream</CODE> object. <P> The data in the <CODE>InputStream</CODE> can be of any type or length. The method returns <CODE>null</CODE> if no resource exists at the given path. <P> To access protected resources the path has to be prefixed with /WEB-INF/ (e.g. /WEB-INF/myportlet/myportlet.jsp). Otherwise, the direct path is used. (e.g. /myportlet/myportlet.jsp).<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getResourceAsStream</CODE> in interface <CODE>javax.servlet.ServletContext</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>path</CODE> - the path to the resource<DT><B>Returns:</B><DD>the input stream</DL></DD></DL><HR><A NAME="getResourceAsStream(java.lang.String, org.apache.jetspeed.portlet.Client, java.util.Locale)"><!-- --></A><H3>getResourceAsStream</H3><PRE>public java.io.InputStream <B>getResourceAsStream</B>(java.lang.String path, <A HREF="../../../../org/apache/jetspeed/portlet/Client.html" title="interface in org.apache.jetspeed.portlet">Client</A> client, java.util.Locale locale)</PRE><DL><DD><B>Deprecated.</B> <DD>Returns the resource located at the given path as an <CODE>InputStream</CODE> object. <P> The data in the <CODE>InputStream</CODE> can be of any type or length. The method returns <CODE>null</CODE> if no resource exists at the given path. <P> To access protected resources the path has to be prefixed with /WEB-INF/ (e.g. /WEB-INF/myportlet/myportlet.jsp). Otherwise, the direct path is used. (e.g. /myportlet/myportlet.jsp). <P> This method is enabled for multi-language and multi-device support. For example, a jsp file "/myportlet/mytemplate.jsp" will be searched for in the following order, when accessing via HTML-Browser: <OL> <LI>/myportlet/html/en_US/mytemplate.jsp <LI>/myportlet/html/en/mytemplate.jsp <LI>/myportlet/html/mytemplate.jsp <LI>/myportlet/mytemplate.jsp </OL><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>path</CODE> - the path to the resource<DD><CODE>client</CODE> - the client<DD><CODE>locale</CODE> - the locale<DT><B>Returns:</B><DD>the input stream</DL></DD></DL><HR><A NAME="getText(java.lang.String, java.lang.String, java.util.Locale)"><!-- --></A><H3>getText</H3><PRE>public java.lang.String <B>getText</B>(java.lang.String bundle, java.lang.String key, java.util.Locale locale)</PRE><DL><DD><B>Deprecated.</B> <DD>Returns the localized text resource with the given key and using the given locale. <P> To use this feature, the portlet application's <CODE>CLASSPATH</CODE> has to contain a resource bundle with
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -