You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The derived module class should be marked with the annotation
javax.servlet.annotation.WebListener to be wired into the Servlet
container lifecycle phases. This enables the module to automatically
support request and session scopes. In addition the module will be
automatically closed when the web container shuts down, so any
components registered with closeWithModule() will also be closed.
Servlets are normally instantiated by the container on-demand in which case
explicit injection would obviously not work. Instead, the ServletModule
offers the method registerComponents() to override and register fully
constructed Servlet objects manually.