|
Handle a multipart request. The return value of this method will be null
if the following conditions are not satisfied:
- request.getContentType() != null
- content type is "multipart/form-data"
- request method is "POST"
If these are satisfied, a Struts
MultipartRequestHandler is created. This object is used
to provide a mapping over both the regular
HttpServletRequest parameters and the
paramters that Struts creates to represent the file(s) that was uploaded. If file(s) were
uploaded, the
java.util.Map returned has key / value pairs of these two structures:
String / String[]
String /
org.apache.commons.fileupload.FileItem
Invokers of this method should be aware that in this case, not all types returned from
what looks like request.getParameterValues(String key) will be String[] .
Parameters: request - the request object Parameters: bean - the current action's associated ActionForm null if the request is not multipart. Otherwise, a java.util.Map is returned that contains the key / value pairs of the parameters in the request and the uploadedfiles. throws: ServletException - if an error occurs loading this file. These exception messagesare not internationalized as Struts does not internationalize them either. |