0

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.

4

1 回答 1

0

嗯,回答我自己...

想想看,dojo.io.iframe 提交表单并没有真正执行AJAX调用,所以基本上使用_<_ portlet:actionURL/>比使用更正确_<_ portlet:resourceURL/>- 自然解决了整个问题。

不管怎么说,还是要谢谢你

于 2011-06-01T06:48:54.527 回答