/** * Whether the application is running standalone within a JAR * * This method will return true only if the the application is executed via `java -jar` * and not if it is run via the main method within an IDE * * @return True if it is running standalone outside a servlet container from within a JAR or WAR file */ public static boolean isStandaloneDeployed() { return isStandalone() && STANDALONE_DEPLOYED; }
/** * Check whether the application is deployed * @return true if is */ public static boolean isWarDeployed() { if(!isStandalone()) { return WAR_DEPLOYED; } return false; }