commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jev...@heroicefforts.net
Subject JSR-168 (portlet) support for FileUpload?
Date Fri, 17 Oct 2003 05:53:06 GMT
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


Mime
View raw message