Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47836
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 24 Nov 2009 01:27:40 +0000 (01:27 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 24 Nov 2009 01:27:40 +0000 (01:27 +0000)
Don't keep TLD/listener info between reloads

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@883565 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/StandardContext.java
java/org/apache/catalina/startup/TldConfig.java

index 1f05e72..e6b7665 100644 (file)
@@ -4815,6 +4815,7 @@ public class StandardContext
         applicationListeners = new String[0];
         applicationEventListenersObjects = new Object[0];
         applicationLifecycleListenersObjects = new Object[0];
+        taglibs = new HashMap<String, String>();
         
         if(log.isDebugEnabled())
             log.debug("resetContext " + oname);
index 1cba6d8..7aea30e 100644 (file)
@@ -608,7 +608,10 @@ public final class TldConfig  implements LifecycleListener {
                 log.error(sm.getString(
                         "tldConfig.execute", context.getPath()), e);
             }
-        } // Ignore the other event types - nothing to do 
+        } else if (event.getType().equals(Lifecycle.STOP_EVENT)) {
+            taglibUris.clear();
+            listeners.clear();
+        }
     }
     
     private void init() {