- Use getInstance rather than create something with a different key. Submitted by...
authorremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 30 Aug 2006 09:05:08 +0000 (09:05 +0000)
committerremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 30 Aug 2006 09:05:08 +0000 (09:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@438428 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/runtime/JspFactoryImpl.java

index 9005f0d..7408eb8 100644 (file)
@@ -178,14 +178,7 @@ public class JspFactoryImpl extends JspFactory {
         }
     }
     
-    private final static String APP_CONTEXT_VARIABLE = JspApplicationContextImpl.class.getName();
-
        public JspApplicationContext getJspApplicationContext(ServletContext context) {
-        JspApplicationContext appContext = (JspApplicationContext) context.getAttribute(APP_CONTEXT_VARIABLE);
-               if (appContext == null) {
-            appContext = new JspApplicationContextImpl();
-            context.setAttribute(APP_CONTEXT_VARIABLE, appContext);
-        }
-        return appContext;
+        return JspApplicationContextImpl.getInstance(context);
        }
 }