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

📄 action.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the default data source for the current module.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;javax.sql.DataSource</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#getDataSource(javax.servlet.http.HttpServletRequest, java.lang.String)">getDataSource</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,              java.lang.String&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the specified data source for the current module.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/struts/action/ActionMessages.html">ActionMessages</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#getErrors(javax.servlet.http.HttpServletRequest)">getErrors</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves any existing errors placed in the request by previous actions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Locale</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#getLocale(javax.servlet.http.HttpServletRequest)">getLocale</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the user's currently selected Locale.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/struts/action/ActionMessages.html">ActionMessages</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#getMessages(javax.servlet.http.HttpServletRequest)">getMessages</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves any existing messages placed in the request by previous actions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/struts/util/MessageResources.html">MessageResources</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#getResources(javax.servlet.http.HttpServletRequest)">getResources</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the default message resources for the current module.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/struts/util/MessageResources.html">MessageResources</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#getResources(javax.servlet.http.HttpServletRequest, java.lang.String)">getResources</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,             java.lang.String&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the specified message resources for the current module.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/struts/action/ActionServlet.html">ActionServlet</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#getServlet()">getServlet</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the servlet instance to which we are attached.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#isCancelled(javax.servlet.http.HttpServletRequest)">isCancelled</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if the current form's cancel button was pressed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#isTokenValid(javax.servlet.http.HttpServletRequest)">isTokenValid</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return <code>true</code> if there is a transaction token stored in the user's current session, and the value submitted as a request parameter with this action matches it.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#isTokenValid(javax.servlet.http.HttpServletRequest, boolean)">isTokenValid</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,             boolean&nbsp;reset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return <code>true</code> if there is a transaction token stored in the user's current session, and the value submitted as a request parameter with this action matches it.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#resetToken(javax.servlet.http.HttpServletRequest)">resetToken</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reset the saved transaction token in the user's session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#saveErrors(javax.servlet.http.HttpServletRequest, org.apache.struts.action.ActionErrors)">saveErrors</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,           <A HREF="../../../../org/apache/struts/action/ActionErrors.html">ActionErrors</A>&nbsp;errors)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use saveErrors(HttpServletRequest, ActionMessages) instead. This will be removed after Struts 1.2.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#saveErrors(javax.servlet.http.HttpServletRequest, org.apache.struts.action.ActionMessages)">saveErrors</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,           <A HREF="../../../../org/apache/struts/action/ActionMessages.html">ActionMessages</A>&nbsp;errors)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save the specified error messages keys into the appropriate request attribute for use by the &lt;html:errors&gt; tag, if any messages are required.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#saveErrors(javax.servlet.http.HttpSession, org.apache.struts.action.ActionMessages)">saveErrors</A></B>(javax.servlet.http.HttpSession&nbsp;session,           <A HREF="../../../../org/apache/struts/action/ActionMessages.html">ActionMessages</A>&nbsp;errors)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save the specified error messages keys into the appropriate session attribute for use by the &lt;html:messages&gt; tag (if messages="false")  or &lt;html:errors&gt;, if any error messages are required.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#saveMessages(javax.servlet.http.HttpServletRequest, org.apache.struts.action.ActionMessages)">saveMessages</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,             <A HREF="../../../../org/apache/struts/action/ActionMessages.html">ActionMessages</A>&nbsp;messages)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save the specified messages keys into the appropriate request attribute for use by the &lt;html:messages&gt; tag (if messages="true" is set), if any messages are required.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#saveMessages(javax.servlet.http.HttpSession, org.apache.struts.action.ActionMessages)">saveMessages</A></B>(javax.servlet.http.HttpSession&nbsp;session,             <A HREF="../../../../org/apache/struts/action/ActionMessages.html">ActionMessages</A>&nbsp;messages)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save the specified messages keys into the appropriate session attribute for use by the &lt;html:messages&gt; tag (if messages="true" is set), if any messages are required.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#saveToken(javax.servlet.http.HttpServletRequest)">saveToken</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save a new transaction token in the user's current session, creating a new session if necessary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/action/Action.html#setLocale(javax.servlet.http.HttpServletRequest, java.util.Locale)">setLocale</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,          java.util.Locale&nbsp;locale)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the user's currently selected <code>Locale</code> into their <code>HttpSession</code>.</TD>
</TR>
<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="../../../../org/apache/struts/action/Action.html#setServlet(org.apache.struts.action.ActionServlet)">setServlet</A></B>(<A HREF="../../../../org/apache/struts/action/ActionServlet.html">ActionServlet</A>&nbsp;servlet)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the servlet instance to which we are attached (if <code>servlet</code> is non-null), or release any allocated resources (if <code>servlet</code> is null).</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="token"><!-- --></A><H3>
token</H3>
<PRE>
private static <A HREF="../../../../org/apache/struts/util/TokenProcessor.html">TokenProcessor</A> <B>token</B></PRE>
<DL>
<DD><p>An instance of <code>TokenProcessor</code> to use for token functionality.</p></DL>
<HR>

<A NAME="defaultLocale"><!-- --></A><H3>
defaultLocale</H3>
<PRE>
protected static java.util.Locale <B>defaultLocale</B></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>Use Locale.getDefault directly.  This will be removed after Struts 1.2.</I>
<P>
<DD><p>The system default Locale.</p></DL>
<HR>

<A NAME="servlet"><!-- --></A><H3>
servlet</H3>
<PRE>
protected <A HREF="../../../../org/apache/struts/action/ActionServlet.html">ActionServlet</A> <B>servlet</B></PRE>
<DL>
<DD><p>The servlet to which we are attached.</p></DL>

⌨️ 快捷键说明

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