code: private DispatcherType getDispatcherType(HttpServletRequest request, ServletContext context)
     {
        for (DispatcherTypeProvider provider : dispatcherProviders) {
           DispatcherType dispatcherType = provider.getDispatcherType(request, context);
           if (dispatcherType != null) {
              return dispatcherType;
           }
        }
        throw new IllegalStateException("Unable to determine dispatcher type of current request");
     }
docs: Determines the {@link DispatcherType} of the current request using the {@link DispatcherTypeProvider} SPI.