📄 action.html
字号:
<BR>
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 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 request, java.lang.String key)</CODE>
<BR>
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 <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 request)</CODE>
<BR>
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 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 request)</CODE>
<BR>
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 <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 request)</CODE>
<BR>
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 <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 request)</CODE>
<BR>
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 <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 request, java.lang.String key)</CODE>
<BR>
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> <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>
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 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 request)</CODE>
<BR>
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 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 request)</CODE>
<BR>
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 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 request, boolean reset)</CODE>
<BR>
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 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 request)</CODE>
<BR>
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 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 request, <A HREF="../../../../org/apache/struts/action/ActionErrors.html">ActionErrors</A> errors)</CODE>
<BR>
<B>Deprecated.</B> <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 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 request, <A HREF="../../../../org/apache/struts/action/ActionMessages.html">ActionMessages</A> errors)</CODE>
<BR>
Save the specified error messages keys into the appropriate request attribute for use by the <html:errors> 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 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 session, <A HREF="../../../../org/apache/struts/action/ActionMessages.html">ActionMessages</A> errors)</CODE>
<BR>
Save the specified error messages keys into the appropriate session attribute for use by the <html:messages> tag (if messages="false") or <html:errors>, 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 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 request, <A HREF="../../../../org/apache/struts/action/ActionMessages.html">ActionMessages</A> messages)</CODE>
<BR>
Save the specified messages keys into the appropriate request attribute for use by the <html:messages> 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 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 session, <A HREF="../../../../org/apache/struts/action/ActionMessages.html">ActionMessages</A> messages)</CODE>
<BR>
Save the specified messages keys into the appropriate session attribute for use by the <html:messages> 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 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 request)</CODE>
<BR>
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 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 request, java.util.Locale locale)</CODE>
<BR>
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> 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> servlet)</CODE>
<BR>
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>
<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>
<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> <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 + -