I'd appreciate your insights on this!
I'm writing an application based on portlet2.0 and JSP. One of the JSPs includes a form which allows users to upload files. I'm using dojo.io.iframe.send()
to upload the file, and address it to the url:< portlet:resourceURL/>, that is - to the GenericPortlet.serveResource(ResourceRequest request, ResourceResponse response)
method.
As this is a multipart request, I can't access the input field parameter through request.getParameter()
, and therefore using the org.apache.commons.fileupload
package.
However, the PortletFileUpload.parseRequest()
gets only an ActionRequest
and not a ResourceRequest
.
My work-around includes getting the HttpServletRequest
object out of the ResourceRequest
, and then using the ServletFileUpload.parseRequest()
.
What do you think of this solution? Do you have any other suggestions for a proper work-around?
Thank you very much for your thoughts.