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 20523] - Model FileUpload model to mimic javax.servlet.Request
Date Mon, 09 Jun 2003 08:38:36 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20523>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20523

Model FileUpload model to mimic javax.servlet.Request





------- Additional Comments From Aristarkhov@bitechnology.ru  2003-06-09 08:38 -------
Probably more effective way will be create a wrapper of HttpServletRequest that 
could be a natural replacement of original HttpServletRequest (for example, 
using filter mechanism). To be compatible with current version of FileUpload 
there could be a method, say 
FileUpload getFileUpload();
that allows to use FileUpload component inteface and not HttpServletRequest API.
There is one more reaason why FileUpload should be implemented as a request 
wrapper. Incoming request imput stream is being read when someone try to read a 
parameter from a request. Just imagine: there is a filter chain where a first 
filter read a parameter from a request - in this case input stream will not be 
available to FileUpload component used inside a target servlet. But if we use 
request wrapper - the only we need is to setup the first filter in a chain, 
say, FileUploadFilter, that will substitute original request to 
FileUploadRequest if incoming request has multipart/* type.
Probably my explanation is confused but I hope that the idea is quite clear.

I'll post some javadocs that could be used to model a request wrapper. I can 
also contribute all source code of our implementation to FileUpload project.

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