Problem on Liferay with sharing Vaadin portlet when Virtual Host is on

Hello everyone,

We’re having a problem on Liferay with virtual hosting and Vaadin portlets. Without virtual hosting, we had no problem sharing Vaadin portlets, using the URL provided by the “Configuration > Sharing > Any website” screen.
Then we’ve configured a virtual host for our one and only community (ex : http://www.domain.com) to get rid of the “/web/guest” part of the URL, it’s working great with most pages except with shared portlets.

The problem is when we try to share a Vaadin portlet (ex : “http://www.domain.com/widget/web/guest/-/home/myVaadinPortlet_INSTANCE_xxxx”), the page keeps reloading in a infinite loop (tested with all main web browsers).

Is that a known limitation ? I’ve searched but found nothing concerning problems with Vaadin portlets and Virtual Hosts. Did anybody encounter the same behaviour ?

Also, where can I find “simple” Vaadin portlet samples for free (like a clock, calendar or survey) ? We’d like to try other Vaadin portlets to see if it’s our way of developing with Vaadin that is the problem :*)

Regards,

Pablo

We’ve found something interesting, in the JavaScript code used to display the Vaadin portlet, the URL of the shared portlet is incorrect :

document.write(“</script>”)}vaadin.vaadinConfigurations[“v-vaadinportlet_WAR_vaadinportlet_INSTANCE_5BOd_LAYOUT_27902”]
={appUri:"
http://mydomain.com/widget/my-page
?p_auth=r4hHcbpX&p_p_id=vaadinportlet_WAR_vaadinportlet_INSTANCE_5BOd&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view",usePortletURLs:true,portletUidlURLBase:"
http://mydomain.com/widget/my-page

The URL of the shared portlet is
http://mydomain.com/widget/my-page
where it should be
http://mydomain.com/widget/web/guest/my-page

It seems the “/web/guest” part of the URL has been removed, which doesn’t work with shared portlets.

To correct it, we’ve used Apache Url Rewriting to automatically add “/web/guest” in the URL if “/widget” is present.

I guess this is a Liferay mistake, but it might help someone around here.

It works for initial display but it fails for other ajax requests as http requests are sent by POST and apache rewriting calls the url by GET.