struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1068626 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
Date Tue, 08 Feb 2011 22:24:31 GMT
Author: jafl
Date: Tue Feb  8 22:24:30 2011
New Revision: 1068626

URL: http://svn.apache.org/viewvc?rev=1068626&view=rev
Log:
WW-3513 one more way to make customization easier

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java?rev=1068626&r1=1068625&r2=1068626&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
Tue Feb  8 22:24:30 2011
@@ -277,7 +277,20 @@ public class FilterDispatcher implements
             String value = filterConfig.getInitParameter(name);
             params.put(name, value);
         }
-        return new Dispatcher(filterConfig.getServletContext(), params);
+        return createDispatcher(filterConfig.getServletContext(), params);
+    }
+
+    /**
+     * Create a default {@link Dispatcher} that subclasses can override
+     * with a custom Dispatcher, if needed.  Called by
+     * createDispatcher(FilterConfig).
+     *
+     * @param ctx ServletContext
+     * @param params parameters from FilterConfig
+     * @return Initialized Dispatcher
+     */
+    protected Dispatcher createDispatcher(ServletContext ctx, Map<String, String> params)
{
+        return new Dispatcher(ctx, params);
     }
 
     /**



Mime
View raw message