?? strutsaction.html
字號:
<!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.4.2) on Wed Jul 19 18:22:42 EDT 2006 --><TITLE>StrutsAction (IBM WebSphere Portal Version 6.0.0.0 API Docs)</TITLE><META NAME="keywords" CONTENT="com.ibm.portal.struts.action.StrutsAction class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="StrutsAction (IBM WebSphere Portal Version 6.0.0.0 API Docs)";}</SCRIPT></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=3 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"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</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="../../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</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-all.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="../../../../../com/ibm/portal/struts/action/LookupDispatchAction.html" title="class in com.ibm.portal.struts.action"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="StrutsAction.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 | <A HREF="#fields_inherited_from_class_org.apache.struts.action.Action">FIELD</A> | <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><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><A NAME="main"></A><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">com.ibm.portal.struts.action</FONT><BR>Class StrutsAction</H2><PRE>java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by">org.apache.struts.action.Action <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>com.ibm.portal.struts.action.StrutsAction</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../com/ibm/portal/struts/action/DispatchAction.html" title="class in com.ibm.portal.struts.action">DispatchAction</A></DD></DL><HR><DL><DT>public class <B>StrutsAction</B><DT>extends org.apache.struts.action.Action</DL><P>A <strong>StrutsAction</strong> is an adapter between the contents of an incoming Portlet request and the corresponding business logic that should be executed to process this request. The controller (StrutsPortlet) will select an appropriate StrutsAction for each request, create an instance (if necessary), and call the <code>execute</code> method.</p> <p>StrutsActions must be programmed in a thread-safe manner, because the controller will share the same instance for multiple simultaneous requests. This means you should design with the following items in mind: </p> <ul> <li>Instance and static variables MUST NOT be used to store information related to the state of a particular request. They MAY be used to share global resources across requests for the same action.</li> <li>Access to other resources (JavaBeans, session variables, etc.) MUST be synchronized if those resources require protection. (Generally, however, resource classes should be designed to provide their own protection where necessary.</li> </ul> <p>When a <code>StrutsAction</code> instance is first created, the controller servlet will call <code>setServlet()</code> with a non-null argument to identify the controller servlet instance to which this Action is attached. When the controller servlet is to be shut down (or restarted), the <code>setServlet()</code> method will be called with a <code>null</code> argument, which can be used to clean up any allocated resources in use by this Action.</p> <p>The Struts Action is a Portal friendly Action that is directly passed the portlet objects. This is the preferred interface for Struts applications that do not need to support the servlet environment.</P><P><P><DL><DT><B>Since:</B></DT> <DD>5.1</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_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>Field Summary</B></FONT></TH></TR></TABLE> <A NAME="fields_inherited_from_class_org.apache.struts.action.Action"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Fields inherited from class org.apache.struts.action.Action</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY</CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_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>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/ibm/portal/struts/action/StrutsAction.html#StrutsAction()">StrutsAction</A></B>()</CODE><BR> Constructor for this class</TD></TR></TABLE> <!-- ========== 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> org.apache.struts.action.ActionForward</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/ibm/portal/struts/action/StrutsAction.html#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.portlet.ActionRequest, javax.portlet.ActionResponse)">execute</A></B>(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)</CODE><BR> Process the current request based on the ActionMapping information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> org.apache.struts.action.ActionForward</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/ibm/portal/struts/action/StrutsAction.html#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)">execute</A></B>(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)</CODE><BR> <B>Deprecated.</B> <I>use execute methods that take portlet objects</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> org.apache.struts.action.ActionForward</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/ibm/portal/struts/action/StrutsAction.html#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.portlet.PortletRequest, javax.portlet.PortletResponse)">execute</A></B>(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)</CODE>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -