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

📄 requestutils.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#selectModule(javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext)">selectModule</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,             javax.servlet.ServletContext&nbsp;context)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/apache/struts/util/ModuleUtils.html#selectModule(javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext)"><CODE>ModuleUtils.selectModule(HttpServletRequest,ServletContext)</CODE></A> 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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#selectModule(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext)">selectModule</A></B>(java.lang.String&nbsp;prefix,             javax.servlet.http.HttpServletRequest&nbsp;request,             javax.servlet.ServletContext&nbsp;context)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/apache/struts/util/ModuleUtils.html#selectModule(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext)"><CODE>ModuleUtils.selectModule(String,HttpServletRequest,ServletContext)</CODE></A> 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>static&nbsp;java.net.URL</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#serverURL(javax.servlet.http.HttpServletRequest)">serverURL</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the URL representing the scheme, server, and port number of the current request.</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="log"><!-- --></A><H3>
log</H3>
<PRE>
protected static org.apache.commons.logging.Log <B>log</B></PRE>
<DL>
<DD><p>Commons Logging instance.</p></DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

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

<A NAME="RequestUtils()"><!-- --></A><H3>
RequestUtils</H3>
<PRE>
public <B>RequestUtils</B>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

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

<A NAME="absoluteURL(javax.servlet.http.HttpServletRequest, java.lang.String)"><!-- --></A><H3>
absoluteURL</H3>
<PRE>
public static java.net.URL <B>absoluteURL</B>(javax.servlet.http.HttpServletRequest&nbsp;request,                                       java.lang.String&nbsp;path)                                throws java.net.MalformedURLException</PRE>
<DL>
<DD><p>Create and return an absolute URL for the specified context-relative path, based on the server and context information in the specified request.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The servlet request we are processing<DD><CODE>path</CODE> - The context-relative path (must start with '/')<DT><B>Returns:</B><DD>absolute URL based on context-relative path<DT><B>Throws:</B><DD><CODE>java.net.MalformedURLException</CODE> - if we cannot create an absolute URL</DL>
</DD>
</DL>
<HR>

<A NAME="applicationClass(java.lang.String)"><!-- --></A><H3>
applicationClass</H3>
<PRE>
public static java.lang.Class <B>applicationClass</B>(java.lang.String&nbsp;className)                                        throws java.lang.ClassNotFoundException</PRE>
<DL>
<DD><p>Return the <code>Class</code> object for the specified fully qualified class name, from this web application's class loader.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>className</CODE> - Fully qualified class name to be loaded<DT><B>Returns:</B><DD>Class object<DT><B>Throws:</B><DD><CODE>java.lang.ClassNotFoundException</CODE> - if the class cannot be found</DL>
</DD>
</DL>
<HR>

<A NAME="applicationInstance(java.lang.String)"><!-- --></A><H3>
applicationInstance</H3>
<PRE>
public static java.lang.Object <B>applicationInstance</B>(java.lang.String&nbsp;className)                                            throws java.lang.ClassNotFoundException,                                                   java.lang.IllegalAccessException,                                                   java.lang.InstantiationException</PRE>
<DL>
<DD><p>Return a new instance of the specified fully qualified class name, after loading the class from this web application's class loader. The specified class <strong>MUST</strong> have a public zero-arguments constructor.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>className</CODE> - Fully qualified class name to use<DT><B>Returns:</B><DD>new instance of class<DT><B>Throws:</B><DD><CODE>java.lang.ClassNotFoundException</CODE> - if the class cannot be found<DD><CODE>java.lang.IllegalAccessException</CODE> - if the class or its constructor  is not accessible<DD><CODE>java.lang.InstantiationException</CODE> - if this class represents an  abstract class, an interface, an array class, a primitive type,  or void<DD><CODE>java.lang.InstantiationException</CODE> - if this class has no  zero-arguments constructor</DL>
</DD>
</DL>
<HR>

<A NAME="createActionForm(javax.servlet.http.HttpServletRequest, org.apache.struts.action.ActionMapping, org.apache.struts.config.ModuleConfig, org.apache.struts.action.ActionServlet)"><!-- --></A><H3>
createActionForm</H3>
<PRE>
public static <A HREF="../../../../org/apache/struts/action/ActionForm.html">ActionForm</A> <B>createActionForm</B>(javax.servlet.http.HttpServletRequest&nbsp;request,                                          <A HREF="../../../../org/apache/struts/action/ActionMapping.html">ActionMapping</A>&nbsp;mapping,                                          <A HREF="../../../../org/apache/struts/config/ModuleConfig.html">ModuleConfig</A>&nbsp;moduleConfig,                                          <A HREF="../../../../org/apache/struts/action/ActionServlet.html">ActionServlet</A>&nbsp;servlet)</PRE>
<DL>
<DD><p>Create (if necessary) and return an <code>ActionForm</code> instance appropriate for this request.  If no <code>ActionForm</code> instance is required, return <code>null</code>.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The servlet request we are processing<DD><CODE>mapping</CODE> - The action mapping for this request<DD><CODE>moduleConfig</CODE> - The configuration for this module<DD><CODE>servlet</CODE> - The action servlet<DT><B>Returns:</B><DD>ActionForm instance associated with this request</DL>
</DD>
</DL>
<HR>

<A NAME="lookupActionForm(javax.servlet.http.HttpServletRequest, java.lang.String, java.lang.String)"><!-- --></A><H3>
lookupActionForm</H3>
<PRE>
private static <A HREF="../../../../org/apache/struts/action/ActionForm.html">ActionForm</A> <B>lookupActionForm</B>(javax.servlet.http.HttpServletRequest&nbsp;request,                                           java.lang.String&nbsp;attribute,                                           java.lang.String&nbsp;scope)</PRE>
<DL>
</DL>
<HR>

<A NAME="canReuseActionForm(org.apache.struts.action.ActionForm, org.apache.struts.config.FormBeanConfig)"><!-- --></A><H3>
canReuseActionForm</H3>
<PRE>
private static boolean <B>canReuseActionForm</B>(<A HREF="../../../../org/apache/struts/action/ActionForm.html">ActionForm</A>&nbsp;instance,                                          <A HREF="../../../../org/apache/struts/config/FormBeanConfig.html">FormBeanConfig</A>&nbsp;config)                                   throws java.lang.ClassNotFoundException</PRE>
<DL>
<DD><p>Determine whether <code>instance</code> of <code>ActionForm</code> is suitable for re-use as an instance of the form described by <code>config</code>.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>instance</CODE> - an instance of <code>ActionForm</code> which was found, probably in either request or session scope.<DD><CODE>config</CODE> - the configuration for the ActionForm which is needed.<DT><B>Returns:</B><DD>true if the instance found is "compatible" with the type required in the <code>FormBeanConfig</code>; false if not, or if <code>instance</code> is null.<DT><B>Throws:</B><DD><CODE>java.lang.ClassNotFoundException</CODE> - if the <code>type</code> property of <code>config</code> is not a valid Class name.</DL>
</DD>
</DL>
<HR>

<A NAME="createActionForm(org.apache.struts.config.FormBeanConfig, org.apache.struts.action.ActionServlet)"><!-- --></A><H3>
createActionForm</H3>
<PRE>
public static <A HREF="../../../../org/apache/struts/action/ActionForm.html">ActionForm</A> <B>createActionForm</B>(<A HREF="../../../../org/apache/struts/config/FormBeanConfig.html">FormBeanConfig</A>&nbsp;config,                                          <A HREF="../../../../org/apache/struts/action/ActionServlet.html">ActionServlet</A>&nbsp;servlet)</PRE>
<DL>
<DD><p>Create and return an <code>ActionForm</code> instance appropriate to the information in <code>config</code>.</p> <p>Does not perform any checks to see if an existing ActionForm exists which could be reused.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>config</CODE> - The configuration for the Form bean which is to be created.<DD><CODE>servlet</CODE> - The action servlet<DT><B>Returns:</B><DD>ActionForm instance associated with this request</DL>
</DD>
</DL>
<HR>

<A NAME="getUserLocale(javax.servlet.http.HttpServletRequest, java.lang.String)"><!-- --></A><H3>
getUserLocale</H3>
<PRE>
public static java.util.Locale <B>getUserLocale</B>(javax.servlet.http.HttpServletRequest&nbsp;request,                                             java.lang.String&nbsp;locale)</PRE>
<DL>
<DD><p>Look up and return current user locale, based on the specified parameters.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The request used to lookup the Locale<DD><CODE>locale</CODE> - Name of the session attribute for our user's Locale.  If this is <code>null</code>, the default locale key is used for the lookup.<DT><B>Returns:</B><DD>current user locale<DT><B>Since: </B><DD>Struts 1.2</DD>
</DL>

⌨️ 快捷键说明

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