留言板

Portlets and Servlet 3.0 Asynch

Dana Oredson,修改在12 年前。

Portlets and Servlet 3.0 Asynch

Junior Member 帖子: 70 加入日期: 08-10-14 最近的帖子
Does the portlet 2.0 specification allow portlets to support the Servlet 3.0 Asynchronous feature? Or is it simply that when a portlet receives a resource request, you dig down to the underlying HttpServletRequest and call startAsync() and continue from there?

Are there any examples of how to do this in a portlet?
thumbnail
David H Nebinger,修改在12 年前。

RE: Portlets and Servlet 3.0 Asynch

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
In general you should try not to cross those boundaries simply because you have no idea what the portal container is going to do on your behalf...

The portal is proxying the request for the portlet, and as part of that proxy the original (actual) request might be wrapped in some form or another, so affecting this change at the portlet level might not be effective and possibly could hose things in the portal.

If I had to approach this, I'd probably do an ext plugin to put a filter in place for the portal's incoming resource request. The filter would ensure the async stuff is handled.

But depending upon what LR may or may not do in the rest of the filter chain and/or processing might foil this effort anyway...
thumbnail
Robin Nagpal,修改在9 年前。

RE: Portlets and Servlet 3.0 Asynch

Junior Member 帖子: 44 加入日期: 14-11-18 最近的帖子
Dana Oredson:
Does the portlet 2.0 specification allow portlets to support the Servlet 3.0 Asynchronous feature? Or is it simply that when a portlet receives a resource request, you dig down to the underlying HttpServletRequest and call startAsync() and continue from there?



So how did you do try to solve the async problem ?