Bootstraplistener and custom meta-tag problem

Hi

I need to add following meta-tag in the header:

<meta name=‘viewport’", "content=‘initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,width=device-width,user-scalable=no’ />

I am using bootstraplistener but I can not add the new meta-tag in the header with modifyBootstrapPage.setHeader(). The method is called and there isnt any errors. Could someone give little help to me?

I modify the Header in Vaadin 7 using: @Override protected void servletInitialized() throws ServletException{ super.servletInitialized(); getService().addSessionInitListener(new SessionInitListener() { @Override public void sessionInit(SessionInitEvent event) throws ServiceException { event.getSession().addBootstrapListener(new BootstrapListener() { @Override public void modifyBootstrapPage(BootstrapPageResponse response) { response.getDocument().head().prependElement("meta").attr("attributename","attributevalue").attr("anotherattribute", "anothervalue"); } @Override public void modifyBootstrapFragment(BootstrapFragmentResponse response) { } }); } }); }

That fixed my problem. Thank you.

It seems that modifyBootstrapPage() is called but the custom meta-tag added with response.getDocument().head().prependElement(“meta”).attr() is not working every time. Some time only way to get new tag into header is refres browser.

Is there a way to fix this problem so that the new meta tag is inside the header every time when the application is started.