Vaadin Spring add-on with TouchKit add-on

Dear all,
We have built our soulution on the touchkit add-on. Right now our application is running pretty wel. Anyway we have decided that regarding the rising app complexity would be better to over do our app using the Spring add-on. The issue is that we extend TouchKitServlet to set TouchKitSettings etc… and we would like to also use (extend) SpringVaadinServlet.

Is there any possibility to use both of them TouchKitServlet and SpringVaadinServlet? We use Spring application initializer to boot our spring context:

public class ApplicationInitializer implements WebApplicationInitializer {

    public void onStartup(ServletContext servletContext) throws ServletException {
        AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();

        servletContext.addListener(new ContextLoaderListener(context));

    private void registerServlet(ServletContext servletContext) {
        ServletRegistration.Dynamic dispatcher = servletContext.addServlet("vaadin", SpringVaadinServlet.class);
        dispatcher.setInitParameter("ui", MyVaadinUI.class.getName());


You have to “manually merge” the functionality of the two servlets. I have done it like this:

Sorry it took ages to respond, I have been on vacations and too little time to go through all messages.


Hi Matti,

it works!

Tahanks a lot.