Java tutorial
//package com.java2s; import java.util.Arrays; import java.util.List; import java.util.Locale; public class Main { private static final List<String> RESERVED_URL_PATTERNS = Arrays.asList("/secur/frontdoor.jsp", "/secur/contentDoor"); /** * Whether the given URL is one of the expected URLs used in the bootstrapping process * of the app. Used for determining the app's "home page" URL. * @param url The URL to compare against the reserved list. * @return True if this URL is used in the bootstrapping process, false otherwise. */ private static boolean isReservedUrl(String url) { if (url == null || url.trim().equals("")) return false; for (String reservedUrlPattern : RESERVED_URL_PATTERNS) { if (url.toLowerCase(Locale.US).contains(reservedUrlPattern.toLowerCase(Locale.US))) return true; } return false; } }