Question

could please anybody tell me, what is the proper way of handling Multipart http requests, that are not supposed to be ActionRequest because of their asynchronous nature ?

For instance, Ajax Multipart requests from flash uploaders. They are not meant to be Action requests because Action phase is followed by render phase right ? As it would be convenient in case of html form.

Some frameworks like Spring are using ResourceRequests for handling common Ajax requests, but there isn't mentioned anything about it handling Multipart requests (in JSR 286).

Then what remains is Render phase, which could be used for that, but it doesn't seem to be right. In spring-portlet-mvc there is practically no way to do that in some cases, because render phase is expected to render a view, not handle requests asynchronously.

In spring framework there are then these issues that I don't know how to deal with

SPR-7662

SPR-7910

My final though is, that Asynchronous requests should be handled by a servlet and not pointed to portal servlet to become a portlet requests, which is quite annoying and it causes lot of extra work. Or, as it is in Spring-portlet-mvc, use ResourceRequests as a workaround.

Was it helpful?

Solution

Well I already explained this question here, in general terms.

In Liferay portal you have to also specify windowState="exclusive" parameter in your action request.

<portlet:actionURL var="actionURL" windowState="<%=LiferayWindowState.EXCLUSIVE.toString()%>" />

It causes that the response won't be wrapped by some html fragments that would otherwise be needed in case of a render response, that doesn't return raw data but some View (JSP) to be rendered.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top