How to include external javascript file inside vaadin gwt module?

I am trying to use openlayers wrapper addon inside a vaadin project. For using OSM layer as base layer, i have included the following line inside the generated gwt.xml file from the addon.

But it seems that the OpenStreetMap.js is not getting downloaded at runtime .
So i am trying to keep the javascript inside the project at the same place as gwt.xml file and include it inside the the gwt.xml file like this.

But still the javascript is not downloaded at runtime, so the openlayers map displays a blank page if i try to use OSM layer as base layer.
Can somebody help me to findout where should i keep the javascript inside project and how to include it inside gwt.xml file.


As far as I know you have to place the javascript file in a subfolder named public.

I tried creating a new folder with name “public” under the same package where the gwt.xml is present and then included the javascript as mentioned below in the gwt.xml file.

But still the OSM layer doesnot work for me inside vaadin application. Probably because the OpenStreetMap.js is not accessible to the code.

Is the path correct in the script tag? Should i put it like this?


did you finally managed to display the openlayers widget in vaadin?

what was the trick?
did you used the gwt-openlayers widget or built some custom component for it?