Re: Change request

Stefan Armbruster <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
You're right, getParameter doesn't work on MultipartRequest using the
standard classes from javax.servlet.

I solved this by createing a HttpFileUploadRequestWrapper that extends
HttpServletRequestWrapper. The new wrapper is initialized with a
HttpServletRequest. 
If the request is not multipart, HttpFileUploadRequestWrapper behaves
exactly like ist superclass. Otherwise it uses Jakarta Commons
Fileupload to parse the request. getParamterNames, getParameter and
getParameterValues are overridden so the use FileUploads's methods in
case of a multipart request.

FormMap uses IMHO only getParameterValues and getParameter for
retrieving field contents. By using HttpfileUploadRequestWrapper this
work full transparently bith both, multipart or non-multipart request.

Stefan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.