Servertec MultiPartForm
Content
Introduction
Release Notes
Features
FAQs
Requirements
Installation
How To
Change Log
Future Plans
Knowledge Base
Documentation
Conventions
Command Line
Administrator
Localization
Programming
Security
Performance
Deployment
Server API
AccessLogEntry
Codecs
Connection
ConnectionPool...
DString
ErrorLogEntry
EventLogEntry
FileCache
FileUpload
IOHandler
IOManager
iws
Logger
MonitorEvent...
MultiPartForm
QuickSort
Realm
RealmAdmin...
RealmManager
ServletContextImpl
ServletContext...
ServletImpl
ServletManager
SocketHandler
Utils

Servlet / JSP API
Xerces API
CGI
SSI
Servlets
Config Files
Log Files
Classes
Directory Tree
Examples
Legal
Contact Us

 

java.lang.Object
 |
 +--stec.iws.MultiPartForm

public final 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 final static Hashtable parse(HttpServletRequest request,
                                    String baseDirectory,
                                    int maxContentLength)
                                    throws Exception
public final static Hashtable parse(HttpServletRequest request, String baseDirectory, int maxContentLength, String charset) 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 the server to denial of service attacks.
charset the character encoding to use.

null is used to specify the platform's default character encoding.

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);
 top of page
Copyright © 1998-2005 Servertec. All rights reserved.
Privacy Statement.
Last Modified: Sun Sep 04 14:57:18 EDT 2005