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

📄 commonsmultipartrequesthandler.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<A NAME="setMapping(org.apache.struts.action.ActionMapping)"><!-- --></A><H3>
setMapping</H3>
<PRE>
public void <B>setMapping</B>(<A HREF="../../../../org/apache/struts/action/ActionMapping.html">ActionMapping</A>&nbsp;mapping)</PRE>
<DL>
<DD>Sets the action mapping with which this handler is associated.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html#setMapping(org.apache.struts.action.ActionMapping)">setMapping</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html">MultipartRequestHandler</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mapping</CODE> - The associated action mapping.</DL>
</DD>
</DL>
<HR>

<A NAME="handleRequest(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>
handleRequest</H3>
<PRE>
public void <B>handleRequest</B>(javax.servlet.http.HttpServletRequest&nbsp;request)                   throws javax.servlet.ServletException</PRE>
<DL>
<DD>Parses the input stream and partitions the parsed items into a set of form fields and a set of file items. In the process, the parsed items are translated from Commons FileUpload <code>FileItem</code> instances to Struts <code>FormFile</code> instances.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html#handleRequest(javax.servlet.http.HttpServletRequest)">handleRequest</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html">MultipartRequestHandler</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The multipart request to be processed.<DT><B>Throws:</B><DD><CODE>javax.servlet.ServletException</CODE> - if an unrecoverable error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="getTextElements()"><!-- --></A><H3>
getTextElements</H3>
<PRE>
public java.util.Hashtable <B>getTextElements</B>()</PRE>
<DL>
<DD>Returns a hash table containing the text (that is, non-file) request parameters.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html#getTextElements()">getTextElements</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html">MultipartRequestHandler</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The text request parameters.</DL>
</DD>
</DL>
<HR>

<A NAME="getFileElements()"><!-- --></A><H3>
getFileElements</H3>
<PRE>
public java.util.Hashtable <B>getFileElements</B>()</PRE>
<DL>
<DD>Returns a hash table containing the file (that is, non-text) request parameters.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html#getFileElements()">getFileElements</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html">MultipartRequestHandler</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The file request parameters.</DL>
</DD>
</DL>
<HR>

<A NAME="getAllElements()"><!-- --></A><H3>
getAllElements</H3>
<PRE>
public java.util.Hashtable <B>getAllElements</B>()</PRE>
<DL>
<DD>Returns a hash table containing both text and file request parameters.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html#getAllElements()">getAllElements</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html">MultipartRequestHandler</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The text and file request parameters.</DL>
</DD>
</DL>
<HR>

<A NAME="rollback()"><!-- --></A><H3>
rollback</H3>
<PRE>
public void <B>rollback</B>()</PRE>
<DL>
<DD>Cleans up when a problem occurs during request processing.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html#rollback()">rollback</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html">MultipartRequestHandler</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="finish()"><!-- --></A><H3>
finish</H3>
<PRE>
public void <B>finish</B>()</PRE>
<DL>
<DD>Cleans up at the end of a request.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html#finish()">finish</A></CODE> in interface <CODE><A HREF="../../../../org/apache/struts/upload/MultipartRequestHandler.html">MultipartRequestHandler</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getSizeMax(org.apache.struts.config.ModuleConfig)"><!-- --></A><H3>
getSizeMax</H3>
<PRE>
protected long <B>getSizeMax</B>(<A HREF="../../../../org/apache/struts/config/ModuleConfig.html">ModuleConfig</A>&nbsp;mc)</PRE>
<DL>
<DD>Returns the maximum allowable size, in bytes, of an uploaded file. The value is obtained from the current module's controller configuration.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mc</CODE> - The current module's configuration.<DT><B>Returns:</B><DD>The maximum allowable file size, in bytes.</DL>
</DD>
</DL>
<HR>

<A NAME="getSizeThreshold(org.apache.struts.config.ModuleConfig)"><!-- --></A><H3>
getSizeThreshold</H3>
<PRE>
protected long <B>getSizeThreshold</B>(<A HREF="../../../../org/apache/struts/config/ModuleConfig.html">ModuleConfig</A>&nbsp;mc)</PRE>
<DL>
<DD>Returns the size threshold which determines whether an uploaded file will be written to disk or cached in memory.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mc</CODE> - The current module's configuration.<DT><B>Returns:</B><DD>The size threshold, in bytes.</DL>
</DD>
</DL>
<HR>

<A NAME="convertSizeToBytes(java.lang.String, long)"><!-- --></A><H3>
convertSizeToBytes</H3>
<PRE>
protected long <B>convertSizeToBytes</B>(java.lang.String&nbsp;sizeString,                                  long&nbsp;defaultSize)</PRE>
<DL>
<DD>Converts a size value from a string representation to its numeric value. The string must be of the form nnnm, where nnn is an arbitrary decimal value, and m is a multiplier. The multiplier must be one of 'K', 'M' and 'G', representing kilobytes, megabytes and gigabytes respectively. If the size value cannot be converted, for example due to invalid syntax, the supplied default is returned instead.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sizeString</CODE> - The string representation of the size to be converted.<DD><CODE>defaultSize</CODE> - The value to be returned if the string is invalid.<DT><B>Returns:</B><DD>The actual size in bytes.</DL>
</DD>
</DL>
<HR>

<A NAME="getRepositoryPath(org.apache.struts.config.ModuleConfig)"><!-- --></A><H3>
getRepositoryPath</H3>
<PRE>
protected java.lang.String <B>getRepositoryPath</B>(<A HREF="../../../../org/apache/struts/config/ModuleConfig.html">ModuleConfig</A>&nbsp;mc)</PRE>
<DL>
<DD>Returns the path to the temporary directory to be used for uploaded files which are written to disk. The directory used is determined from the first of the following to be non-empty. <ol> <li>A temp dir explicitly defined either using the <code>tempDir</code>     servlet init param, or the <code>tempDir</code> attribute of the     &lt;controller&gt; element in the Struts config file.</li> <li>The container-specified temp dir, obtained from the     <code>javax.servlet.context.tempdir</code> servlet context     attribute.</li> <li>The temp dir specified by the <code>java.io.tmpdir</code> system     property.</li> (/ol><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mc</CODE> - The module config instance for which the path should be           determined.<DT><B>Returns:</B><DD>The path to the directory to be used to store uploaded files.</DL>
</DD>
</DL>
<HR>

<A NAME="addTextParameter(javax.servlet.http.HttpServletRequest, org.apache.commons.fileupload.FileItem)"><!-- --></A><H3>
addTextParameter</H3>
<PRE>
protected void <B>addTextParameter</B>(javax.servlet.http.HttpServletRequest&nbsp;request,                                org.apache.commons.fileupload.FileItem&nbsp;item)</PRE>
<DL>
<DD>Adds a regular text parameter to the set of text parameters for this request and also to the list of all parameters. Handles the case of multiple values for the same parameter by using an array for the parameter value.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The request in which the parameter was specified.<DD><CODE>item</CODE> - The file item for the parameter to add.</DL>
</DD>
</DL>
<HR>

<A NAME="addFileParameter(org.apache.commons.fileupload.FileItem)"><!-- --></A><H3>
addFileParameter</H3>
<PRE>
protected void <B>addFileParameter</B>(org.apache.commons.fileupload.FileItem&nbsp;item)</PRE>
<DL>
<DD>Adds a file parameter to the set of file parameters for this request and also to the list of all parameters.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>item</CODE> - The file item for the parameter to add.</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="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <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="class-use/CommonsMultipartRequestHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/struts/upload/BufferedMultipartInputStream.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/struts/upload/CommonsMultipartRequestHandler.CommonsFormFile.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="CommonsMultipartRequestHandler.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Copyright 

⌨️ 快捷键说明

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