Package com.vaadin.cdi
Class CdiVaadinServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.vaadin.flow.server.VaadinServlet
com.vaadin.cdi.CdiVaadinServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class CdiVaadinServlet
extends com.vaadin.flow.server.VaadinServlet
Servlet to create
CdiVaadinServletService.
An instance of this servlet is automatically deployed by
CdiServletDeployer if no VaadinServlet is deployed based on web.xml or
Servlet 3.0 annotations. A subclass of this servlet and of
CdiVaadinServletService can be used and explicitly deployed
to customize it, in which case
createServletService(DeploymentConfiguration) must call
service.init() .
- See Also:
-
Field Summary
Fields inherited from class com.vaadin.flow.server.VaadinServlet
INTERNAL_VAADIN_SERVLET_VITE_DEV_MODE_FRONTEND_PATHFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.server.VaadinServletServicecreateServletService(com.vaadin.flow.function.DeploymentConfiguration configuration) static StringName of the Vaadin servlet for the current thread.voidinit(jakarta.servlet.ServletConfig servletConfig) protected voidservice(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Methods inherited from class com.vaadin.flow.server.VaadinServlet
createDeploymentConfiguration, createDeploymentConfiguration, createServletService, createStaticFileHandler, createVaadinRequest, destroy, getCurrent, getFrontendMapping, getLastPathParameter, getService, getServletConfig, handleContextOrServletRootWithoutSlash, serveStaticOrWebJarRequest, servletInitialized, whenFrontendMappingAvailableMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceMethods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
CdiVaadinServlet
public CdiVaadinServlet()
-
-
Method Details
-
init
public void init(jakarta.servlet.ServletConfig servletConfig) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classcom.vaadin.flow.server.VaadinServlet- Throws:
jakarta.servlet.ServletException
-
service
protected void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException - Overrides:
servicein classcom.vaadin.flow.server.VaadinServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
getCurrentServletName
Name of the Vaadin servlet for the current thread.Until VaadinService appears in CurrentInstance, it have to be used to get the servlet name.
This method is meant for internal use only.
- Returns:
- currently processing vaadin servlet name
- See Also:
-
VaadinServlet.getCurrent()
-
createServletService
protected com.vaadin.flow.server.VaadinServletService createServletService(com.vaadin.flow.function.DeploymentConfiguration configuration) throws com.vaadin.flow.server.ServiceException - Overrides:
createServletServicein classcom.vaadin.flow.server.VaadinServlet- Throws:
com.vaadin.flow.server.ServiceException
-