/** * Search for value of DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY in the web-app first, then as a system property and * as an environment variable last. * * @param ctx * @return True if value of DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY is available and set to "true", false otherwise. */ boolean isDisabledByConfiguration(ServletContext ctx) { String disableAttributeStr = null; Object disableAttribute = ctx.getInitParameter(DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY); if (disableAttribute instanceof String) { disableAttributeStr = (String) disableAttribute; } if (OptionHelper.isEmpty(disableAttributeStr)) { disableAttributeStr = OptionHelper.getSystemProperty(DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY); } if (OptionHelper.isEmpty(disableAttributeStr)) { disableAttributeStr = OptionHelper.getEnv(DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY); } if (OptionHelper.isEmpty(disableAttributeStr)) return false; return disableAttributeStr.equalsIgnoreCase("true"); }
private String lookupKey(String key) { String value = propertyContainer0.getProperty(key); if (value != null) return value; if (propertyContainer1 != null) { value = propertyContainer1.getProperty(key); if (value != null) return value; } value = OptionHelper.getSystemProperty(key, null); if (value != null) return value; value = OptionHelper.getEnv(key); if (value != null) { return value; } return null; }
public static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2) { String value = null; // first try the props passed as parameter value = pc1.getProperty(key); // then try the pc2 if (value == null && pc2 != null) { value = pc2.getProperty(key); } // then try in System properties if (value == null) { value = getSystemProperty(key, null); } if (value == null) { value = getEnv(key); } return value; }
/** * Heuristically determines whether the current OS is Android */ static public boolean isAndroidOS() { String osname = OptionHelper.getSystemProperty("os.name"); String root = OptionHelper.getEnv("ANDROID_ROOT"); String data = OptionHelper.getEnv("ANDROID_DATA"); return osname != null && osname.contains("Linux") && root != null && root.contains("/system") && data != null && data.contains("/data"); }
public static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2) { String value = null; // first try the props passed as parameter value = pc1.getProperty(key); // then try the pc2 if (value == null && pc2 != null) { value = pc2.getProperty(key); } // then try in System properties if (value == null) { value = getSystemProperty(key, null); } if (value == null) { value = getEnv(key); } return value; }
private String lookupKey(String key) { String value = propertyContainer0.getProperty(key); if (value != null) return value; if (propertyContainer1 != null) { value = propertyContainer1.getProperty(key); if (value != null) return value; } value = OptionHelper.getSystemProperty(key, null); if (value != null) return value; value = OptionHelper.getEnv(key); if (value != null) { return value; } return null; }
public static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2) { String value = null; // first try the props passed as parameter value = pc1.getProperty(key); // then try the pc2 if (value == null && pc2 != null) { value = pc2.getProperty(key); } // then try in System properties if (value == null) { value = getSystemProperty(key, null); } if (value == null) { value = getEnv(key); } return value; }
public static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2) { String value = null; // first try the props passed as parameter value = pc1.getProperty(key); // then try the pc2 if (value == null && pc2 != null) { value = pc2.getProperty(key); } // then try in System properties if (value == null) { value = getSystemProperty(key, null); } if (value == null) { value = getEnv(key); } return value; }
/** * Search for value of DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY in the web-app first, then as a system property and * as an environment variable last. * * @param ctx * @return True if value of DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY is available and set to "true", false otherwise. */ boolean isDisabledByConfiguration(ServletContext ctx) { String disableAttributeStr = null; Object disableAttribute = ctx.getInitParameter(DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY); if (disableAttribute instanceof String) { disableAttributeStr = (String) disableAttribute; } if (OptionHelper.isEmpty(disableAttributeStr)) { disableAttributeStr = OptionHelper.getSystemProperty(DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY); } if (OptionHelper.isEmpty(disableAttributeStr)) { disableAttributeStr = OptionHelper.getEnv(DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY); } if (OptionHelper.isEmpty(disableAttributeStr)) return false; return disableAttributeStr.equalsIgnoreCase("true"); }
public static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2) { String value = null; // first try the props passed as parameter value = pc1.getProperty(key); // then try the pc2 if (value == null && pc2 != null) { value = pc2.getProperty(key); } // then try in System properties if (value == null) { value = getSystemProperty(key, null); } if (value == null) { value = getEnv(key); } return value; }
/** * Search for value of DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY in the web-app first, then as a system property and * as an environment variable last. * * @param ctx * @return True if value of DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY is available and set to "true", false otherwise. */ boolean isDisabledByConfiguration(ServletContext ctx) { String disableAttributeStr = null; Object disableAttribute = ctx.getInitParameter(DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY); if (disableAttribute instanceof String) { disableAttributeStr = (String) disableAttribute; } if (OptionHelper.isEmpty(disableAttributeStr)) { disableAttributeStr = OptionHelper.getSystemProperty(DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY); } if (OptionHelper.isEmpty(disableAttributeStr)) { disableAttributeStr = OptionHelper.getEnv(DISABLE_SERVLET_CONTAINER_INITIALIZER_KEY); } if (OptionHelper.isEmpty(disableAttributeStr)) return false; return disableAttributeStr.equalsIgnoreCase("true"); }
private String lookupKey(String key) { String value = propertyContainer0.getProperty(key); if (value != null) return value; if (propertyContainer1 != null) { value = propertyContainer1.getProperty(key); if (value != null) return value; } value = OptionHelper.getSystemProperty(key, null); if (value != null) return value; value = OptionHelper.getEnv(key); if (value != null) { return value; } return null; }
public static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2) { String value = null; // first try the props passed as parameter value = pc1.getProperty(key); // then try the pc2 if (value == null && pc2 != null) { value = pc2.getProperty(key); } // then try in System properties if (value == null) { value = getSystemProperty(key, null); } if (value == null) { value = getEnv(key); } return value; }
public static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2) { String value = null; // first try the props passed as parameter value = pc1.getProperty(key); // then try the pc2 if (value == null && pc2 != null) { value = pc2.getProperty(key); } // then try in System properties if (value == null) { value = getSystemProperty(key, null); } if (value == null) { value = getEnv(key); } return value; }
public static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2) { String value = null; // first try the props passed as parameter value = pc1.getProperty(key); // then try the pc2 if (value == null && pc2 != null) { value = pc2.getProperty(key); } // then try in System properties if (value == null) { value = getSystemProperty(key, null); } if (value == null) { value = getEnv(key); } return value; }
private String lookupKey(String key) { String value = propertyContainer0.getProperty(key); if (value != null) return value; if (propertyContainer1 != null) { value = propertyContainer1.getProperty(key); if (value != null) return value; } value = OptionHelper.getSystemProperty(key, null); if (value != null) return value; value = OptionHelper.getEnv(key); if (value != null) { return value; } return null; }
private String lookupKey(String key) { String value = propertyContainer0.getProperty(key); if (value != null) return value; if (propertyContainer1 != null) { value = propertyContainer1.getProperty(key); if (value != null) return value; } value = OptionHelper.getSystemProperty(key, null); if (value != null) return value; value = OptionHelper.getEnv(key); if (value != null) { return value; } return null; }
private String lookupKey(String key) { String value = propertyContainer0.getProperty(key); if (value != null) return value; if (propertyContainer1 != null) { value = propertyContainer1.getProperty(key); if (value != null) return value; } value = OptionHelper.getSystemProperty(key, null); if (value != null) return value; value = OptionHelper.getEnv(key); if (value != null) { return value; } return null; }
private String lookupKey(String key) { String value = propertyContainer0.getProperty(key); if (value != null) return value; if (propertyContainer1 != null) { value = propertyContainer1.getProperty(key); if (value != null) return value; } value = OptionHelper.getSystemProperty(key, null); if (value != null) return value; value = OptionHelper.getEnv(key); if (value != null) { return value; } return null; }
private String lookupKey(String key) { String value = propertyContainer0.getProperty(key); if (value != null) return value; if (propertyContainer1 != null) { value = propertyContainer1.getProperty(key); if (value != null) return value; } value = OptionHelper.getSystemProperty(key, null); if (value != null) return value; value = OptionHelper.getEnv(key); if (value != null) { return value; } return null; }