Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Alexey Truntov
Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
November 16, 2011 6:29 AM
Answer

Alexey Truntov

Rank: New Member

Posts: 22

Join Date: July 15, 2011

Recent Posts

Hello.

Our application uses Liferay + JSF2.0 + portletfaces + primefaces. Everything works fine on Tomcat, but AJAX-requests doesn't work on Weblogic.

The reason is that when processing AJAX-requests Liferay creates ByteBufferServletResponse via ETagFilter and it's not getting closed, which results in unflushed response "leftovers" in SteamEncoder created over UnsyncByteArrayOutputStream. So, client receives AJAX-responses trimmed to 8192 (SteamEncoder default buffer size) * N bytes.

On Tomcat, ApplicationDispatcher closes writer of servlet response explicitly and those leftovers getting flushed at that very instant, but on Weblogic things are different.

We created ancestor of org.portletfaces.bridge.GenericFacesPortlet and tried to flush leftovers after handling PortletRequest, but ByteBufferServletResponse overrides flushBuffer() with an empty method (and i believe it does this for a reason); so for now we turned off ETagFilter in Liferay's web.xml, but that's only temporary solution.

Could anyone suggest how this scheme should work? Should servlet container make explicit calls to close ServlerResponse writer?

PS: we're using Liferay 6.0 and Weblogic 10.3.5.
Tomas Polesovsky
RE: Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
November 22, 2011 4:04 AM
Answer

Tomas Polesovsky

LIFERAY STAFF

Rank: Liferay Master

Posts: 641

Join Date: February 13, 2009

Recent Posts

Hello Alexey

I've looked at your problem for a while.

Maybe I see one workaround that could help you. Try to override your FacesPortlet and write another 8192 white space characters into response stream after handling the AJAX response. I know it isn't good solution but it could flush your response. Meanwhile I try to look deeper into the problem.

-- tom
unai alba
RE: Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
May 16, 2012 9:01 AM
Answer

unai alba

Rank: New Member

Posts: 15

Join Date: June 7, 2010

Recent Posts

Hi!

we are facing the same problem. In tomcat it works perfect but in weblogic ajax/js errors are thrown "xml malformed"..... possibly related to the buffer because it works randomly... but few times...


Any ideas? It´s already solved?


Thanks in advance.

Regards
Neil Griffin
RE: Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
May 16, 2012 12:47 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2335

Join Date: July 26, 2005

Recent Posts

Unai, are you using WebLogic 10.3.5 also?
Alexey Truntov
RE: Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
May 16, 2012 1:12 PM
Answer

Alexey Truntov

Rank: New Member

Posts: 22

Join Date: July 15, 2011

Recent Posts

We fixed this problem by disabling ETag filter.
Neil Griffin
RE: Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
May 16, 2012 1:52 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2335

Join Date: July 26, 2005

Recent Posts

Thanks Alexey.
unai alba
RE: Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
May 16, 2012 11:25 PM
Answer

unai alba

Rank: New Member

Posts: 15

Join Date: June 7, 2010

Recent Posts

Neil Griffin:
Unai, are you using WebLogic 10.3.5 also?



Hi Neil,

yes we are using liferay liferay-portal-6.0.6-20110225, WebLogic Server: 10.3.5.0 ,JSF, Primefaces 3.1 but no JSF ajax neither primefaces ajax calls works properly.

Regards
unai alba
RE: Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
May 16, 2012 11:22 PM
Answer

unai alba

Rank: New Member

Posts: 15

Join Date: June 7, 2010

Recent Posts

Alexey Truntov:
We fixed this problem by disabling ETag filter.



Hi Alexey,

Could you explain the steps to disable the ETag filter?


Thanks and regards
Alexey Truntov
RE: Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
May 17, 2012 12:29 AM
Answer

Alexey Truntov

Rank: New Member

Posts: 22

Join Date: July 15, 2011

Recent Posts

unai alba:
Alexey Truntov:
We fixed this problem by disabling ETag filter.

Could you explain the steps to disable the ETag filter?


You can disable it by putting this line in your portal-ext.properties:
com.liferay.portal.servlet.filters.etag.ETagFilter=false

It's not a great solution, merely a workaround, but it worked for us.
unai alba
RE: Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
May 17, 2012 1:07 AM
Answer

unai alba

Rank: New Member

Posts: 15

Join Date: June 7, 2010

Recent Posts

Alexey Truntov:
unai alba:
Alexey Truntov:
We fixed this problem by disabling ETag filter.

Could you explain the steps to disable the ETag filter?


You can disable it by putting this line in your portal-ext.properties:
com.liferay.portal.servlet.filters.etag.ETagFilter=false

It's not a great solution, merely a workaround, but it worked for us.



Thanks Alexey!! It works now both in ie and firefox!!
We have been finding a solution for a while, so for us is more than a workaround emoticon
Thanks a lot!

Regards
Neil Griffin
RE: Liferay + Weblogic + AJAX + JSF2.0 - doesn't work
May 30, 2013 12:41 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2335

Join Date: July 26, 2005

Recent Posts

FYI, I reproduced a related ViewExpiredException on WebLogic and documented a fix in FACES-1591.