commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39276] New: - [fileupload] add support for Servlet 2.3 filters
Date Tue, 11 Apr 2006 20:47:15 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39276>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39276

           Summary: [fileupload] add support for Servlet 2.3 filters
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: File Upload
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: stephen.butler@gmail.com


With Java Servlets 2.3 each servlet can have a filter filter chain that wraps
around the "service" call. This set of patches and files enables parsing of
multipart requests in the filter. A new ServletRequest wrapper is created which
exposes the FileUpload objects to the servlet later. Several things to note:

1) Servlets can check to see if it is a multipart request with the statement:

if (request instanceof FileUploadServletRequest) { /* ... */ }

2) FileItem objects are exposed in FileUploadServletRequest through an API
similar to the standard getParameter() API. For example,
FileUploadServletRequest implements:

FileItem getFileItem( String name );
FileItem[] getFileItemValues( String name );
Enumeration getFileItemNames();
Map getFileItemMap();

3) Any simple form fields are automatically made available through the
getParameter() API. These fields are merged with any other fields the servlet
request might have already contained (ie: through query parameters). This allows
developers to easily extend existing servlets with mutlipart requests.


These patches have only been superficially tested and no JUnit tests have been
written. I look forward to suggestions and comments (I'm also subscribed to
commons-dev, so discussion can take place there if that's more convenient).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message