Commits

Anonymous committed e65948e

WW-161:ServletDispatcher could be a lot simpler to extend. Moved getActionName() methods together and made the getActionName(String name) protected.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@579573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 7ccdb36

Comments (0)

Files changed (1)

File src/java/com/opensymphony/webwork/dispatcher/ServletDispatcher.java

     }
 
     /**
+     * Determine action name by extracting last string and removing extension (i.e., /.../.../Foo.action -> Foo).
+     *
+     * @param name the full action path.
+     * @return the action name stripped of path/context info.
+     */
+    protected String getActionName(String name) {
+        // Get action name ("Foo.action" -> "Foo" action)
+        int beginIdx = name.lastIndexOf("/");
+        int endIdx = name.lastIndexOf(".");
+
+        return name.substring(((beginIdx == -1) ? 0 : (beginIdx + 1)), (endIdx == -1) ? name.length() : endIdx);
+    }
+
+    /**
      * Returns a Map of all application attributes. The default implementation is to wrap the ServletContext
      * in an {@link ApplicationMap}. Override this method to customize how application attributes are mapped.
      *
 
         return maxSize.intValue();
     }
-
-    /**
-     * Determine action name by extracting last string and removing extension (i.e., /.../.../Foo.action -> Foo).
-     *
-     * @param name the full action path.
-     * @return the action name stripped of path/context info.
-     */
-    String getActionName(String name) {
-        // Get action name ("Foo.action" -> "Foo" action)
-        int beginIdx = name.lastIndexOf("/");
-        int endIdx = name.lastIndexOf(".");
-
-        return name.substring(((beginIdx == -1) ? 0 : (beginIdx + 1)), (endIdx == -1) ? name.length() : endIdx);
-    }
 }