The restartApplication parameter is not restarting my Vaadin Portlet

Hello Vaadin community!!!

This is my first post here and I hope for my question to be useful and has not been answered already in another discussion.

I’m starting developing Liferay portlets version 2 with Vaadin in debug mode (The context parameter “productionMode” is set to false in web.xml) and everything looks great, my portlets are looking very good and I’m liking Vaadin a lot.

My problem is when I try to restart my Vaadin application (portlet application) adding the ?restartApplication parameter to the url or using the “Restart app” button in the debug window, it seems the application is not restarting right because the state of the app don’t change and the init method is not executed again.

Someone knows if there is a known problem restarting Vaadin applications when these are deployed as Liferay portlets?

My Liferay version is 5.2.3 on Tomcat 6.0.18 and Vaadin 6.2.3.



I guess the problem is that the application instantiation is done by Liferay, not by the explicit URL in the browser’s address bar. The Vaadin servlet never gets the URL parameter when it’s instantiated by Liferay.

I’d consider this as a bug, and worth fixing.

As a workaround, have you tried using a ParameterHandler for your application? If you can catch the ?restartApplication (or any other parameter) with the handler, you can then restart the application yourself.

PS. Welcome to the Vaadin community! :slight_smile:

That is not the issue. When using Portlet 2.0, there is no servlet associated with the application.

There is also no standardized/portable way of accessing URL parameters. The ?debug parameter is currently handled by a trick on the client side instead.

I agree this can be considered a bug, but it is not a simple one to address, if possible at all in a cross-portal manner.

I believe this will not work with Portlet 2.0 - as stated above, there is no official way to access arbitrary URL parameters. Only portlet parameters (encoded by the portal in the URL or elsewhere) can be accessed through the official APIs.

Hi Jouni and Henri,

Nice to meet you and thanks for your replies.

I understand the problem and I also understand that this is not easy to fix at least in a clean way, but I do agree that this is a bug and it is worth fixing.

Maybe a dirty workaround is to add a restart button in my portlet only for debug purposes.

This issue is tracked with the
ticket 4160
, which is preliminarily targeted for a near future maintenance release.