You are here

Share configuration files

Share can be configured through a number of configuration files.

The main Share configuration file is share-config.xml. This can be found in a default installation at tomcat/webapps/share/WEB-INF/classes/alfresco/share-config.xml. While it is possible to change configuration through direct changes to this file this is not recommended as any customizations will be lost if the Share WAR is re-exploded, or you install a new version of Alfresco Content Services.

To get around this issue it is advisable to make configuration changes to a file outside of the Share WAR. This can be done through the file share-config-custom.xml, which can be found at tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml in the default Alfresco installation. Any changes made here will be applied once the changes have been saved, and Alfresco Content Services restarted. Further, your configuration changes can be saved between reinstalls and if the Share WAR re-explodes at any point your configuration file will be unaffected.

Note: If you are overriding a configuration section, you must apply the replace="true" attribute to replace the existing Alfresco Content Services configuration.

It should also be noted that it is possible to package a share-config-custom.xml file in a JAR or AMP. In this way you can have multiple share-config-custom.xml files packaged in JARs or AMPs if necessary. JARs will be loaded from the classpath, for example ./tomcat/shared/lib. AMPs will be applied to the Share WAR file.

The order in which multiple share-config-custom.xml files are applied is not guaranteed in the case where multiple files override the same section of configuration.

Another key Share configuration file is slingshot-application-context.xml which can be found at tomcat/webapps/share/WEB-INF/classes/alfresco/slingshot-application-context.xml in the default Alfresco installation. This loads a number of other configuration files:

    <!-- Spring Web Scripts -->
    <!-- Alfresco Surf -->
    <!-- Surf Autowire Support -->

    <!-- Common form config -->
    <!-- Share default config -->
    <!-- Share help url config -->
    <!-- Share form config -->
    <!-- Share Document Library config -->

    <!-- Share Data List form config -->

    <!-- Share workflow form config -->
    <!-- Share CMIS config -->

    <!-- Share Security config -->

    <!-- Share custom config -->

Note that the custom configuration files are loaded last, so that they can override existing configuration.

Note that the configuration files with the same base file name must have different effective paths in order to be loaded. For example, if you tried to load classes/alfresco/web-extension/share-config-custom.xml and WEB-INF/classes/alfresco/web-extension/share-config-custom.xml, only one of them would be loaded, as these both have the effective path alfresco/web-extension/share-config-custom.xml. Note that where files are loaded from multiple JAR files, such as through <value>jar:*!/META-INF/share-config-custom.xml</value>, they have different effective paths, and so multiple configuration files with the same base file name can be successfully loaded in this case.

Configuration files

The following table summarizes the main Share configuration files:

Configuration file Description Location
share-config.xml Default Share configuration file. classpath:alfresco
slingshot-application-context.xml Spring beans file which also loads various configuration files. tomcat/webapps/share/WEB-INF/classes/alfresco
share-form-config.xml Default configuration for the cm:content and cm:folder forms. classpath:alfresco
share-datalist-form-config.xml Default configuration for datalists. classpath:alfresco
share-documentlibrary-config.xml Default configuration for the document library, my files, shared files and repository pages. classpath:alfresco
share-workflow-config.xml Default configuration file for the Alfresco Process Services Workflow forms. classpath:alfresco

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.