First you need the BootstrapManager then simply call the following method:
Confluence 5.5 and earlier:
1
String confluenceHome = bootstrapManager.getConfluenceHome();
Confluence 5.6 and later:
1
String confluenceHome = bootstrapManager.getSharedHome();
or
1
String confluenceHome = bootstrapManager.getLocalHome();
The BootstrapManager also has a getConfiguredLocalHome
method. This method is used during system startup to determine the location of confluence.home from first principles. There is no reason for you to call this method.
Related:
Rate this page: