diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java index 87350506c41..4edb6f5e082 100644 --- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java +++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java @@ -83,7 +83,7 @@ public class AnnotationConfiguration extends AbstractConfiguration public void deconfigure(WebAppContext context) throws Exception { - context.setAttribute(CLASS_INHERITANCE_MAP, null); + } @@ -91,6 +91,7 @@ public class AnnotationConfiguration extends AbstractConfiguration public void postConfigure(WebAppContext context) throws Exception { + context.setAttribute(CLASS_INHERITANCE_MAP, null); } } diff --git a/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/AbstractConfiguration.java b/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/AbstractConfiguration.java index c0fb65ee3f2..1b859f672b4 100644 --- a/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/AbstractConfiguration.java +++ b/jetty-plus/src/main/java/org/eclipse/jetty/plus/webapp/AbstractConfiguration.java @@ -411,6 +411,13 @@ public abstract class AbstractConfiguration implements Configuration context.setAttribute(RunAsCollection.RUNAS_COLLECTION, runAsCollection); } + public void postConfigure(WebAppContext context) throws Exception + { + context.setAttribute(LifeCycleCallbackCollection.LIFECYCLE_CALLBACK_COLLECTION, null); + context.setAttribute(InjectionCollection.INJECTION_COLLECTION, null); + context.setAttribute(RunAsCollection.RUNAS_COLLECTION, null); + } + public void configure (WebAppContext context) throws Exception { diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/FragmentConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/FragmentConfiguration.java index 76fede564c4..8f67cc30725 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/FragmentConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/FragmentConfiguration.java @@ -69,12 +69,12 @@ public class FragmentConfiguration implements Configuration public void deconfigure(WebAppContext context) throws Exception { - context.setAttribute(FRAGMENT_RESOURCES, null); - + } public void postConfigure(WebAppContext context) throws Exception { + context.setAttribute(FRAGMENT_RESOURCES, null); } /* ------------------------------------------------------------------------------- */ diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java index 4e60870db45..e053781ed25 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java @@ -85,14 +85,14 @@ public class MetaInfConfiguration implements Configuration public void deconfigure(WebAppContext context) throws Exception { - context.setAttribute(METAINF_FRAGMENTS, null); - context.setAttribute(METAINF_RESOURCES, null); - context.setAttribute(METAINF_TLDS, null); + } public void postConfigure(WebAppContext context) throws Exception { - + context.setAttribute(METAINF_FRAGMENTS, null); + context.setAttribute(METAINF_RESOURCES, null); + context.setAttribute(METAINF_TLDS, null); } public void addResource (WebAppContext context, String attribute, Resource jar) diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java index 297ada3ef48..cee9b115989 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java @@ -282,13 +282,12 @@ public class TagLibConfiguration implements Configuration public void postConfigure(WebAppContext context) throws Exception { - // TODO Auto-generated method stub - + context.setAttribute(TldProcessor.TAGLIB_PROCESSOR, null); } public void deconfigure(WebAppContext context) throws Exception { - context.setAttribute(TldProcessor.TAGLIB_PROCESSOR, null); + } } diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java index 3f921f293c5..2148b5c9d67 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java @@ -112,8 +112,8 @@ public class WebInfConfiguration implements Configuration public void postConfigure(WebAppContext context) throws Exception { - // TODO Auto-generated method stub - + context.setAttribute(CONTAINER_JAR_RESOURCES, null); + context.setAttribute(WEB_INF_JAR_RESOURCES, null); } @@ -166,8 +166,7 @@ public class WebInfConfiguration implements Configuration setTempDirectory(null, context); } - context.setAttribute(CONTAINER_JAR_RESOURCES, null); - context.setAttribute(WEB_INF_JAR_RESOURCES, null); + context.setAttribute(TEMPDIR_CREATED, null); context.setAttribute(context.TEMPDIR, null); } diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebXmlConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebXmlConfiguration.java index 150d07038fb..da33f6f05f3 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebXmlConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebXmlConfiguration.java @@ -123,8 +123,10 @@ public class WebXmlConfiguration implements Configuration public void postConfigure(WebAppContext context) throws Exception { - // TODO Auto-generated method stub - + context.setAttribute(WebXmlProcessor.WEB_PROCESSOR, null); + context.setAttribute(WebXmlProcessor.METADATA_COMPLETE, null); + context.setAttribute(WebXmlProcessor.WEBXML_VERSION, null); + context.setAttribute(WebXmlProcessor.WEBXML_CLASSNAMES, null); } @@ -176,9 +178,5 @@ public class WebXmlConfiguration implements Configuration // TODO remove classpaths from classloader - context.setAttribute(WebXmlProcessor.WEB_PROCESSOR, null); - context.setAttribute(WebXmlProcessor.METADATA_COMPLETE, null); - context.setAttribute(WebXmlProcessor.WEBXML_VERSION, null); - context.setAttribute(WebXmlProcessor.WEBXML_CLASSNAMES, null); } }