diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java index 42c3aa47038..3e90c9fffe4 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java @@ -175,7 +175,6 @@ public class ServletContextHandler extends ContextHandler _servletHandler = servletHandler; _objFactory = new DecoratedObjectFactory(); - _objFactory.addDecorator(new DeprecationWarning()); // Link the handlers relinkHandlers(); @@ -302,6 +301,7 @@ public class ServletContextHandler extends ContextHandler @Override protected void doStart() throws Exception { + _objFactory.addDecorator(new DeprecationWarning()); getServletContext().setAttribute(DecoratedObjectFactory.ATTR, _objFactory); super.doStart(); }