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 following methods are provided on the ServletContext interface to enable programmatic definition of servlets, filters and the url pattern(s) that they map to. These methods can only be called during the initialization of the application either from the contexInitialized method of a ServletContextListener implementation or from the onStartup method of a ServletContainerInitializer implementation. In addition to adding servlets and filters, one can also look up an instance of a Registration object corresponding to a servlet or filter or a map of all the Registration objects for the servlets or filters. If a ServletContext is passed to the ServletContextListener’s contextInitialized method where the ServletContextListener was neither declared in web.xml or web-fragment.xml nor annotated with @weblistener then an UnsupportedOperationException MUST be thrown for all the methods defined in ServletContext for programmatic configuration of servlets, filters and listeners.
I'd like to start a discussion about cleaning up these remaining "getters" and potentially a specification document update to ensure it matches the API.
The text was updated successfully, but these errors were encountered:
The following Servlet 6.0 issue removed this restriction from a number of getter methods: #416.
However, the following getter methods still throw an UnsupportedOperationException:
In addition, the Specification document still declares the following: https://github.com/jakartaee/servlet/blob/master/spec/src/main/asciidoc/servlet-spec-body.adoc#44-configuration-methods
I'd like to start a discussion about cleaning up these remaining "getters" and potentially a specification document update to ensure it matches the API.
The text was updated successfully, but these errors were encountered: