Package com.vaadin.cdi
Class CdiServletDeployer
java.lang.Object
com.vaadin.cdi.CdiServletDeployer
- All Implemented Interfaces:
jakarta.servlet.ServletContainerInitializer
public class CdiServletDeployer
extends Object
implements jakarta.servlet.ServletContainerInitializer
Container initializer that automatically registers a CDI Vaadin servlet.
The servlet is only registered if all of the following conditions apply:
- At least one class annotated with
@Routeis found on the classpath - No servlet is registered for
/* - No Vaadin servlet is registered
Vaadin ships with ServletDeployer, which is a WebListener
to register the default VaadinServlet.
We can't override it from java, but since this class is a
container initializer, we run first.
After registration of the CDI Vaadin Servlet, the original
deployer won't register the default one.
The rest of this class is copied from ServletDeployer.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CdiServletDeployer
public CdiServletDeployer()
-
-
Method Details
-
onStartup
- Specified by:
onStartupin interfacejakarta.servlet.ServletContainerInitializer
-