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

📄 portletcontext.html.svn-base

📁 portal越来越流行了
💻 SVN-BASE
📖 第 1 页 / 共 3 页
字号:
 can be located on a local or remote file system, in a database, or in a <code>.war</code> file.  <p>The portlet container must implement the URL handlers and <code>URLConnection</code> objects that are necessary to access the resource. <p>This method returns <code>null</code> if no resource is mapped to the pathname. <p>Some containers may allow writing to the URL returned by this method using the methods of the URL class. <p>The resource content is returned directly, so be aware that  requesting a <code>.jsp</code> page returns the JSP source code. Use a <code>RequestDispatcher</code> instead to include results of  an execution. <p>This method has a different purpose than <code>java.lang.Class.getResource</code>, which looks up resources based on a class loader. This method does not use class loaders.<DD><DL><DT><B>Parameters:</B><DD><CODE>path</CODE> - a <code>String</code> specifying						the path to the resource<DT><B>Returns:</B><DD>the resource located at the named path, 						or <code>null</code> if there is no resource						at that path<DT><B>Throws:</B><DD><CODE>MalformedURLException</CODE> - if the pathname is not given in  						the correct form</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&nbsp;name)</PRE><DL><DD>Returns the portlet container attribute with the given name,  or null if there is no attribute by that name. An attribute allows a portlet container to give the portlet additional information not already provided by this interface. A list of supported attributes can be retrieved using <code>getAttributeNames</code>. <p>The attribute is returned as a <code>java.lang.Object</code> or some subclass. Attribute names should follow the same convention as package names. The Java Portlet API specification reserves names matching <code>java.*</code>, <code>javax.*</code>, and <code>sun.*</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> specifying the name 			of the attribute<DT><B>Returns:</B><DD>an <code>Object</code> containing the value 			of the attribute, or <code>null</code>			if no attribute exists matching the given			name<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.<DT><B>See Also: </B><DD><A HREF="../../javax/portlet/PortletContext.html#getAttributeNames()"><CODE>getAttributeNames()</CODE></A></DL></DD></DL><HR><A NAME="getAttributeNames()"><!-- --></A><H3>getAttributeNames</H3><PRE>public java.util.Enumeration <B>getAttributeNames</B>()</PRE><DL><DD>Returns an <code>Enumeration</code> containing the attribute names  available within this portlet context, or an emtpy <code>Enumeration</code> if no attributes are available. Use the <A HREF="../../javax/portlet/PortletContext.html#getAttribute(java.lang.String)"><CODE>getAttribute(java.lang.String)</CODE></A> method with an attribute name to get the value of an attribute.<DD><DL><DT><B>Returns:</B><DD>an <code>Enumeration</code> of attribute names<DT><B>See Also: </B><DD><A HREF="../../javax/portlet/PortletContext.html#getAttribute(java.lang.String)"><CODE>getAttribute(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="getInitParameter(java.lang.String)"><!-- --></A><H3>getInitParameter</H3><PRE>public java.lang.String <B>getInitParameter</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Returns a String containing the value of the named context-wide  initialization parameter, or <code>null</code> if the parameter does not exist. This method provides configuration information which may be useful for  an entire "portlet application".<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> containing the name of the                    requested parameter<DT><B>Returns:</B><DD>a <code>String</code> containing the value			of the initialization parameter, or                     <code>null</code> if the parameter does not exist.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.<DT><B>See Also: </B><DD><A HREF="../../javax/portlet/PortletContext.html#getInitParameterNames()"><CODE>getInitParameterNames()</CODE></A></DL></DD></DL><HR><A NAME="getInitParameterNames()"><!-- --></A><H3>getInitParameterNames</H3><PRE>public java.util.Enumeration <B>getInitParameterNames</B>()</PRE><DL><DD>Returns the names of the context initialization parameters as an  <code>Enumeration</code> of String objects, or an empty Enumeration if the context  has no initialization parameters.<DD><DL><DT><B>Returns:</B><DD>an <code>Enumeration</code> of <code>String</code>                   objects containing the names of the context                  initialization parameters<DT><B>See Also: </B><DD><A HREF="../../javax/portlet/PortletContext.html#getInitParameter(java.lang.String)"><CODE>getInitParameter(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="log(java.lang.String)"><!-- --></A><H3>log</H3><PRE>public void <B>log</B>(java.lang.String&nbsp;msg)</PRE><DL><DD>Writes the specified message to a portlet log file, usually an event log. The name and type of the portlet log file is specific to the portlet container. <p> This method mapps to the <code>ServletContext.log</code> method. The portlet container may in addition log this message in a portlet container specific log file.<DD><DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - a <code>String</code> specifying the 			message to be written to the log file</DL></DD></DL><HR><A NAME="log(java.lang.String, java.lang.Throwable)"><!-- --></A><H3>log</H3><PRE>public void <B>log</B>(java.lang.String&nbsp;message,                java.lang.Throwable&nbsp;throwable)</PRE><DL><DD>Writes an explanatory message and a stack trace for a given  Throwable exception to the portlet log file. The name and type of the portlet log file is specific to the  portlet container, usually an event log. <p> This method is mapped to the <code>ServletContext.log</code> method. The portlet container may in addition log this message in a portlet container specific log file.<DD><DL><DT><B>Parameters:</B><DD><CODE>message</CODE> - a <code>String</code> that 				describes the error or exception<DD><CODE>throwable</CODE> - the <code>Throwable</code> error 				or exception</DL></DD></DL><HR><A NAME="removeAttribute(java.lang.String)"><!-- --></A><H3>removeAttribute</H3><PRE>public void <B>removeAttribute</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Removes the attribute with the given name from the portlet context. After removal, subsequent calls to <A HREF="../../javax/portlet/PortletContext.html#getAttribute(java.lang.String)"><CODE>getAttribute(java.lang.String)</CODE></A> to retrieve the attribute's value will return <code>null</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> specifying the name  			of the attribute to be removed<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</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&nbsp;name,                         java.lang.Object&nbsp;object)</PRE><DL><DD>Binds an object to a given attribute name in this portlet context. If the name specified is already used for an attribute, this method  removes the old attribute and binds the name to the new attribute. <p> If a null value is passed, the effect is the same as calling  <code>removeAttribute()</code>.  <p>Attribute names should follow the same convention as package names. The Java Portlet API specification reserves names matching <code>java.*</code>, <code>javax.*</code>, and <code>sun.*</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> specifying the name 			of the attribute<DD><CODE>object</CODE> - an <code>Object</code> representing the			attribute to be bound<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if name is <code>null</code>.</DL></DD></DL><HR><A NAME="getPortletContextName()"><!-- --></A><H3>getPortletContextName</H3><PRE>public java.lang.String <B>getPortletContextName</B>()</PRE><DL><DD>Returns the name of this portlet application correponding to this PortletContext as specified  in the <code>web.xml</code> deployment descriptor for this web application by the  <code>display-name</code> element.<DD><DL><DT><B>Returns:</B><DD>The name of the web application or null if no name has been declared in the deployment descriptor.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>Portlet API (V1.0) </EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/portlet/PortletConfig.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/portlet/PortletPreferences.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>  &nbsp;&nbsp;<A HREF="PortletContext.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><a href=license.txt >Copyright</a> &#169; 2003 IBM Corporation and Sun Microsystems, Inc. All rights reserved</BODY></HTML>

⌨️ 快捷键说明

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