How to add <base> element to page header in ZK Framework

Sometimes it is useful to create <base> tag in a page header. This is easy when you have access to html files. It’s not so simple when you are on ZK Framework. This short snippet shows it should be done in a ZUL file:

<zscript><![CDATA[ page.addBeforeHeadTags("<base href=\"http://localhost:8080/your-webapp/\" />"); ]]></zscript>
<!-- your zk elements -->