put javascript link to the page

How is it possible to make vaadin put javascript import to the page.

I tried a workaroud from here http://vaadin.com/forum/-/message_boards/view_message/68879

here is my layout file “custom_layout_with_overlib.html”

And the Application code

setTheme("mytheme");
	Window main = new Window("The Main Window");
setMainWindow(main);
CustomLayout customLayout = new CustomLayout("custom_layout_with_overlib");
main.addComponent(customLayout);

One of the requests I see in firebug is
POST /myapp/UIDL?repaintAll=1&sh=1050&sw=1680&cw=1680&ch=437&vw=1680&vh=437&fr=

and response is:

for(;;);[{“Vaadin-Security-Key”:“b0aa0b5b-e14d-4307-8d90-5aa563a36f49”,“changes”:[[“change”,{“format”: “uidl”,“pid”: “PID0”},[“0”,{“id”: “PID0”,“height”: “438px”,“width”: “1680px”,“caption”: “The Main Window”,“name”: “1”,“theme”: “mytheme”,“resizable”:true,“main”:true,“layoutRelativeWidth”:true,“v”:{“tabindex”:-1,“scrollLeft”:0,“scrollTop”:0,“positionx”:-1,“positiony”:-1,“close”:false}},[“1”,{“id”: “PID2”,“width”: “100.0%”,“margins”:0,“template”: “custom_layout_with_overlib”}]
]]], “meta” : {“repaintAll”:true}, “resources” : {“layouts/custom_layout_with_overlib.html” : “\r\n\r\n\r\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\r\n<script src="/scripts/overlib.js" type="text/javascript"></script>\r\n</title>\r\n</head>\r\n\r\n\r\n</body>\r\n</html>”}, “typeMappings” : { “com.vaadin.ui.Window” : 0 , “com.vaadin.ui.CustomLayout” : 1 }, “locales”:[{“name”:“en_GB”,“smn”:[“Jan”,“Feb”,“Mar”,“Apr”,“May”,“Jun”,“Jul”,“Aug”,“Sep”,“Oct”,“Nov”,“Dec”]
,“mn”:[“January”,“February”,“March”,“April”,“May”,“June”,“July”,“August”,“September”,“October”,“November”,“December”]
,“sdn”:[“Sun”,“Mon”,“Tue”,“Wed”,“Thu”,“Fri”,“Sat”]
,“dn”:[“Sunday”,“Monday”,“Tuesday”,“Wednesday”,“Thursday”,“Friday”,“Saturday”]
,“fdow”:1,“df”:“dd/MM/yy”,“thc”:false,“hmd”:“:”}]}]

But as I see it doesn’t make a page to load the javascript file.

What are other options?

Can you use e.g. Firebug to verify that no HTTP request is made for that resource? I just suspect that the URL for the script is wrong (are you running your app in the root context of your server?).

Yes, I checked requests with firebug. And it doesn’t try to load javascript

Try placing the script tag inside the body element instead of the head, since I believe the CustomLayout only uses the body part when rendering the template.