writeAjaxPageHtmlHeader - Migrating Vaadin 6 to 7.3.2

Hi,
I had a method in my ApplicationServlet where I was used to pass some view instructions like this one:

@Override
protected void writeAjaxPageHtmlHeader(final BufferedWriter page,
        String title, String themeUri, final HttpServletRequest request)
        throws IOException {
    page.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n");

    WebBrowser browser = getApplicationContext(request.getSession()).getBrowser();
    if (browser.isIE()) {
        // Chrome frame in all versions of IE (only if Chrome frame is
        // installed)
        page.write("<meta http-equiv=\"X-UA-Compatible\" content=\"chrome=1\"/>\n");
    }

    page.write("<style type=\"text/css\">"
            + "html, body {height:100%;margin:0;}</style>");

    page.write("<title>" + safeEscapeForHtml(title) + "</title>");
}

Now using Vaadin 7.3.2, I do not know how I can get the same functionality/results.

After the migration process, my Login Page is not being presented, but I am not getting any errors.

Thanks in advance

This is something that has changed between 6 and 7 versions. With Vaadin 7 you should setup BootStrapListener instead and do these in there

@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = VaadinUI.class)
public static class Servlet extends VaadinServlet {
	@Override
	protected void servletInitialized() throws ServletException {
		super.servletInitialized();
		getService().addSessionInitListener(new MySessionInitListener());
	}
}

and

public static class MySessionInitListener implements SessionInitListener {

	@Override
	public void sessionInit(SessionInitEvent event) throws ServiceException {
		VaadinSession session = event.getSession();
		session.addBootstrapListener(new MyBootstrapListener());
	}
}

I am just wondering why you are migrating to 7.3.2, which is rather old version and in end of lifetime in its support.

Thanks for your reply.

Do you recommend migrating from 6 to latest version ?
It is a bold step and I was trying to do this incrementally.

It’s not easy to give a recommendation without knowing the context, but if you’re planning on going to 7, you should probably at least go to 7.7.16, which is the last Vaadin 7 release. There are about four years worth of feature development and bugfixes in Vaadin 7 between 7.3.6 and 7.7.16.

Thanks for your reply, Olli.

I was able to conclude the migration from 6.8 to 7.4.8.
Right now I intend to proceed to version 8.