Testers needed for Portlet 2.0 support

Hello everyone,

I’m currently working on Portlet 2.0 support for Vaadin and I have a preliminary implementation ready for testing in a separate
of the Vaadin source tree. Currently, it only works on Liferay 5.2 and it has not been documented yet.

Before the Portlet 2.0 code can be incorporated into the official Vaadin source tree, it has to be tested and this is where you come in. Currently, we have been able to run the address book and sampler applications inside a portlet, with minor modifications.

If you have a portlet application, some time to spare and are comfortable building Vaadin from source, I would very much appreciate it if you could try out the Portlet 2.0 code and report any problems to me. Any comments or feedback can be posted either as replies to this forum post or as comments to
ticket. Please do not create any new tickets until the Portlet 2.0 code has been incorporated into the official source tree.

There are a few restrictions you have to take into account when developing applications that will be deployed using the new Portlet 2.0 code:

  • The application URI does not exist and must not be used by the application.
  • Custom themes and widgetsets must be provided by the portal, they cannot be served by the portlet. For Liferay, this means that the VAADIN-directory must be copied into the webapps/ROOT/html directory.

There may be more restrictions, but this is all I can think of for now. In order to deploy an application, use the following configuration in

	<display-name>Hello World</display-name>

Thanks in advance,


Step-by-step instructions for compiling this on a Mac:

  1. svn co Contribute to Vaadin in Github
  2. mkdir portlet_2.0/build/gwt
  3. cd portlet_2.0/build/gwt
  4. curl -O Contribute to Vaadin in Github
  5. tar xfz gwt-mac-1.7.0.tar.gz
  6. mv gwt-mac-1.7.0 mac
  7. cd …
  8. ant -Dignoreversion=1 package-mac
  9. Fetch coffee… (Total build time on my MacBook: 9 minutes 26 seconds)
  10. Look at the results at vaadin-mac-6.2.0.dev-20091111.tar.gz
  1. unzip liferay-portal-tomcat-6.0-5.2.3.zip
  2. tar xfz vaadin-mac-6.2.0.dev-20091111.tar.gz
  3. cp vaadin-mac-6.2.0.dev-20091111/WebContent/vaadin-6.2.0.dev-20091111.jar liferay-portal-5.2.3/tomcat-6.0.18/webapps/ROOT/WEB-INF/lib/vaadin.jar
  4. cp -r vaadin-mac-6.2.0.dev-20091111/WebContent/VAADIN liferay-portal-5.2.3/tomcat-6.0.18/webapps/ROOT/html

These steps also work on Ubuntu Linux, provided that you have installed Subversion, curl, Ant and Java 6. In addition, you need to make the following changes to the commands:

Step 4: curl -O http://dev.vaadin.com/svn/gwt/1.7.0/gwt-linux-1.7.0.tar.bz2
Step 5: tar xfvj gwt-linux-1.7.0.tar.bz2
Step 6: mv gwt-linux-1.7.0 linux
Stek 8: ant -Dignoreversion=1 package-linux

Some questions

Are you using portlet 2.0 resource interface for Vaadin ajax calls?

Does this implementation has access to PortletRequest and PortletSession?

Can you have several instances of these portlets on same portal page?

  • Sampsa

Hello Sampsa,

Yes, we are.

The actual portlet implementation uses PortletRequest and PortletSession, but these are not made available to the Vaadin application.

Yes, you can.


Hello Petter,

I’m working on a new Portlet with Portlet 2.0. I use Liferay 5.2.3 on JBoss.
I would like to use the Events from Portlet 2,0. I will tell you about working or problems.

Greeting Martin

Hello Petter,

when i change the application class in portlet.xml from com.vaadin.terminal.gwt.server.ApplicationPortlet to com.vaadin.terminal.gwt.server.ApplicationPortlet2 and implement PortletListener in main Application class, i get an Exception

2010-06-09 06:54:38,296 INFO  [STDOUT]
 ERROR - javax.portlet.PortletException: Failed to load application class: servletname
javax.portlet.PortletException: Failed to load application class: servletname
	at com.vaadin.terminal.gwt.server.ApplicationPortlet2.init(ApplicationPortlet2.java:48)
	at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:250)
	at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:245)

Without Portlet 2.0 it works.

Any experience?

Just a guess: With portlet 1.0, the application parameter refers to web.xml, whereas with portlet 2.0, it should point to the application class. Did you update the application parameter value as well when you updated the portlet class?

the book

Henri thanks,
I’ve read the article, but I probably overlooked this part.
Now I have a Portlet without exeception, but also without contents. Are there also changes with Portlet 2.0? Ich set the height to 400px.

Greeting Martin

Maybe it would be better to move this discussion to one of the other forum categories, out of “News & Announcements”.

Try to see e.g. with Firebug if the contents are there, but with zero size, or not. It might be that some other layout level has size settings that make it shrink to zero size.

Okay last message :wink:

Problem solved!
The following advice could facilitate also the life for different testers.

The portlet.xml is in the documentation well explained, only the example for web.xml is short.
The block must be deleted! The servlet-name in must be equal to portlet name from portlet.xml.

In my portlet.xml, one error is occuring “The class com.vaadin.terminal.gwt.server.ApplicationPortlet2 was not found on the Java Build Path”. Can you tell me which jar i need to install ??

Probably too late, but note that this thread is five years old and for Vaadin 6. Vaadin 7 uses VaadinPortlet. See the book or other sources for more information.