|
Maybe Upload 1-1-0 by Weft | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
See:
Description
| Class Summary | |
| DumpServlet | Crude basic debugging tool. |
| MaybeUploadRequestWrapper | A wrapper around a ServletRequest, which knows how to handle multipart/form-data requests gracefully. |
| MaybeUploadServlet | A superclass for Servlets which may need to handle file upload. |
| MultipartHandler | A handler for multipart-form-data data per RFC 1867. |
| SnoopServlet | A copy of SnoopServlet from the Servlet 2.2 reference implementation, modified to inherit from MaybeUploadServlet. |
| TestHarness | A test-harness for the multipart-form-data handler. |
| UploadedBytes | An enhancement to ByteArrayInputStream that supports several additional fields concerning uploaded files. |
| UploadedFile | An enhancement to File that supports several additional fields concerning uploaded files. |
| Exception Summary | |
| RequestTooLargeException | An exception thrown if the multipart request size exceeds the user-specified maximum. |
| UploadException | An exception to throw if upload fails |
MaybeUpload is a Java language package intended to make it much easier to write Servlets to handle RFC1867 file upload.
You can download the latest version of this package from here.
MaybeUpload has been widely used for over a year and is now included with Apache's Cocoon2 distribution. We have had no bug reports whatsoever in the last six months (as of 24th July 2002). It should be viewed as pretty reliable.
MaybeUpload is written to the Servlet 2.2 specification, and relies heavily on code from the reference implementation. This product includes software developed by the Apache Software Foundation (http://www.apache.org/).
MaybeUpload is also dependent on the RegExp regular expression parser package from the Apache Foundation
This package is intended to be more or less transparent in use. The only changes you need make in your existing code is that instead of inheriting from javax.servlet.http.HttpServlet you should instead inherit from MaybeUploadServlet; that the request parameter of you MaybeUploadServlet.doGet(), MaybeUploadServlet.doPost(), etc methods is a MaybeUploadRequestWrapper and not an javax.servlet.http.HttpServletRequest (but as it implements both HttpServletRequest and ServletRequest this should not trouble you). Finally, to get values from request parameters we recommend you use MaybeUploadRequestWrapper.get( name).
This package draws heavily on the Servlet 2.2 reference package. In writing it we've also referred to Jason Hunter's excellent book, Java Servlet Programming, but we deliberately have not looked at any code of Jason's other than that contained in the book, as the license he uses is not compatible with the BSD license we use.
The following is the whole of your license and warranty to use this package:
[Note: this is the 'BSD License' as endorsed by OpenSource.org.]
Copyright (c) 2000, 2001 Simon Brooke. All rights reserved.
Some parts Copyright (c) 1999 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Simon Brooke nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WEFT TECHNOLOGY LTD OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
© Simon Brooke, Carlinscraig, Auchencairn, DG7 1QU, Scotland.
|
Maybe Upload 1-1-0 by Weft | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||