code: public static Enumeration getRequestLocales(HttpServletRequest request) {
          Enumeration values = request.getHeaders("accept-language");
          if (values == null) {
              // No header for "accept-language". Simply return
              // a new empty enumeration.
              // System.out.println("Null accept-language");
              return new Vector().elements();
          } else if (values.hasMoreElements()) {
              // At least one "accept-language". Simply return
              // the enumeration returned by request.getLocales().
              // System.out.println("At least one accept-language");
              return request.getLocales();
          } else {
              // No header for "accept-language". Simply return
              // the empty enumeration.
              // System.out.println("No accept-language");
              return values;
          }
      }
docs: HttpServletRequest.getLocales() returns the server's default locale
  if the request did not specify a preferred language.
  We do not want this behavior, because it prevents us from using
  the fallback locale.
  We therefore need to return an empty Enumeration if no preferred
  locale has been specified. This way, the logic for the fallback
  locale will be able to kick in.