private static Action determinerAction(String action, Map<String, Action> routes) {

        Action handler = routes.get(action);
        if (handler != null)
            return handler;
        String a = action;
        int i = a.lastIndexOf("/");
        while (i > 0) {
            a = action.substring(0, i);
            i = a.lastIndexOf("/");
            handler = routes.get(a + "/*");
            if (handler != null)
                return handler;
        }
        return handler;
    }