Maybe Upload 1-1-0 by Weft

Package uk.co.weft.maybeupload

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
 

Package uk.co.weft.maybeupload Description

MaybeUpload is a Java language package intended to make it much easier to write Servlets to handle RFC1867 file upload.

  • download
  • Status
  • Dependencies
  • Using It
  • License
  • Download

    You can download the latest version of this package from here.

    Status

    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.

    Dependencies

    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

    Using it

    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).

    Copyright and License

    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:

    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.





    Maybe Upload 1-1-0 by Weft