Retrieve property from xsp.properties in NSF, server or notes.ini


public static String getXspProperty(String propertyName, String defaultValue) {
	String retVal = ApplicationEx.getInstance().getApplicationProperty(propertyName,
			getIniVar(propertyName, defaultValue));
	return retVal;
}

public static String getIniVar(String propertyName, String defaultValue) {
	try {
		String newVal = getSession().getEnvironmentString(propertyName, true);
		if (StringUtil.isEmpty(newVal)) {
			return newVal;
		} else {
			return defaultValue;
		}
	} catch (NotesException e) {
		debugPrint(e);
		return defaultValue;
	}
}
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...