Explicit servlet configuration


I have found no documentation on how to make explicity configuration of Vaadin servlets ands listeners. Which listeners should be registered? Which filters? Which variables settings are important?

I don’t want to rely on automatic, autoscanned configuration.

As it seems, Vaadin don’t provide a way to explicitly configure servlets. That is problem because one must rely on server scanning in order to make Vaadin works. Since servlet specification don’t provide a way of selecting which jars should be scanned — you can either turn it ON or OFF, no middle grounds —, Vaadin applications are prone to performance issues: if too many jars are used and the application grows too much server startup becomes increasingly slower as it will have to scan even more classes. This becomes worse because there seems to be no way of restricting where Vaadin itself should look to it’s @Routes annotations: an application with hundreds of classes can have a dozen routes all of then located into a single sub package structure, but Vaadin will look at all the classpath for them. At last, Vaadin applications are also prone to security issues just because Servlet 3.0 with scanning are because some unintented class may be loaded without the app dev knows of it.