java.lang.Object
|
+--stec.iws.MultiPartForm
public class MultiPartForm
Used to parse multi part forms.
Methods
|
Method
|
Description
|
|
parse
|
Returns a hashtable containing the form elements.
|
parse
Returns a hashtable containing the form elements.
Syntax
public static Hashtable parse(HttpServletRequest request,
String baseDirectory,
int maxContentLength)
throws Exception
Parameters
|
request
|
the servlet request object.
|
|
baseDirectory
|
the base directory to use. null, if none. If none the file is
uploaded into a buffer which can be accessed using getBuffer().
|
|
maxContentLength
|
the maximum length of the request. -1 if unlimited. Using -1
can open iServer to denial of service attacks.
|
Returns
|
Hashtable
|
contains the form elements and uploaded files. Each form element is a
Vector of items containing either a String or a
FileUpload object. String is used by form elements and
FileUpload object is used by uploaded files.
|
Throws
|
Exception
|
for invalid content type, when content length exceeds maximum content length,
when content boundary is not found, when end is found while searching for
content and when content header is not valid.
|
Example
Hashtable ht = MultiPartForm.parse(request, baseDir, maxSize);
|