How to create cookie via Vaadin app

Hey All,

Pardon me if this question is trivial, but how do I create a cookie via a vaadin application? or point me in the right direction in the Vaadin book. In my current Servlet based application, we simply do

    PrintWriter out = response.getWriter();
out.write("<script type='text/javascript'> document.cookie = \" "+ cookieName + "=" +  cookieVal +"; path=/; domain=.company.com \" "  + "</script>"
		);

Thanks in advance

You can check this
post
, where creating cookies is discussed - but it involves making an own component. The code is there however.

Hey thanks for the quick reply. I am now in the middle of trying it.