Vaadin Gate-IN portlet

I tried deploy Vaadin Portlet as written here http://vaadin.com/book/-/page/advanced.portal.html. I used Portlet 2.0 spec.
I see portlet in administration panel, but all resources(js,css, etc.) links of portlet generating wrong. Links looks like
http://localhost:8080/html/VAADIN/widgetsets/com.vaadin.portal.gwt.PortalDefaultWidgetSet/com.vaadin.portal.gwt.PortalDefaultWidgetSet.nocache.js?1297069806825
, but I haven’t any applications deployed on /html context.
How to solve this problem?

The widgetsets and themes must be served statically by the portal. Create a “html” directory in the ROOT directory of your portal and extract the VAADIN directory from the Vaadin zip to that directory. All your portlets will then use the widgetset from that directory.

Thank you for solution. It helped. :slight_smile:
But can you give advice how to make resources links relative of my portlet like: “http://localhost:8080/myportlet/html/VAADIN…”

Typically your portlet is not mapped to /myportlet - only if you have a web.xml with a servlet definition you will have a /myportlet. Also it is usually better to put the widgetset in the portal wide directory because if you have multiple portlets serving multiple versions of the widgetset or the theme you will run into conflicts.

The implementation looks for a “vaadin.resources.path” property in the PortalContext to determine where the static files are, so if you get the property set there it will load the resources from another location (“/html” is the default).

Hi Artur,

I’m trying to configure the vaadin.resources.path property in GateIn but I haven’t manage to do it yet. I’ve tried to add it in gatein/conf/configuration.properties as well as in webapps/portal/WEB-INF/web.xml but to no avail.

Do you know how to put this attribute in the PortalContext?

Not sure how you can set it in GateIn but if you cannot find the place you can also override AbstractApplicationPortlet.getStaticFilesLocation and return the location you desire (by default “/html” is returned).

Thanks for the hint Artur!