You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by je...@heroicefforts.net on 2003/10/17 07:53:06 UTC
JSR-168 (portlet) support for FileUpload?
I was wondering if there are any plans to support JSR-168 in the file
upload component, once the spec is finalized? This would provide file
upload convenience to portlet developers. It seems to require only
superficial code changes to support the spec.
The important difference is that portlets are provided a javax.portal.
ActionRequest rather than the HttpServletRequest. The only relevant
distinctions (that I've found) are that getHeaders("Content-type") is
replaced by getContentType() and getInputStream() is replaced by
getPortletInputStream().
It only took about thirty minutes to hack this change in. I took the
following steps:
1. Created a minimal, common interface, called it UploadRequest.
2. Replaced references to HttpServletRequest with the new interface.
3. Created two adapters implementing the new interface, one for
HttpServletRequest and one for ActionRequest.
4. Overrode parse methods to accept and wrap HttpServletRequest
and ActionRequest, for convenience and backward compatibility.
Comments? Does this fall into the scope of the package?
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org