How do I get the location of the confluence.home directory?

How do I get the location of the confluence.home directory?

First you need the BootstrapManager then simply call the following method:

Confluence 5.5 and earlier:

String confluenceHome = bootstrapManager.getConfluenceHome();

Confluence 5.6 and later:

String confluenceHome = bootstrapManager.getSharedHome();

or

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:

How do I get a reference to a component

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport