New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
o.e.j.servlet.listener.ContainerInitializer does not respect servlet spec contract for ServletContainerInitializers #5834
Comments
One solution may be to use a jetty lifecycle listener instead of a ServletContextListener |
for embedded-jetty, I would love to see an API like ... ServletContextHandler context = new ServletContextHandler();
context.addServletContextInitializer(new MySCI());
// other init
context.start(); Then let Jetty work out the internals of how that should come to be. |
@lachlan-roberts I think you are already addressing this one in #5840 |
I'm ok with deprecation if it is entirely removed in jetty-10 and above. |
|
This has been fixed with PR #5959. |
jetty 9.4.x
See #3706.
The premise of the org.eclipse.jetty.servlet.listener.ContainerInitializer according to the comments is to ease using ServletContainerInitializers in embedded scenarios. Unfortunately, it calls the SCI from a ServletContextListener: according to the spec, a ServletContextListener cannot add another ServletContextListener. Thus, an SCI called via the ContainerInitializer will not be able to add a ServletContextListener, as it is perfectly entitled to do.
The text was updated successfully, but these errors were encountered: