Configuring the Web Central Search Directories
Configuring the Web Central Search Directories
System integrators and enterprise IT staff can customize the search directories in \WEB-INF\config\context\compatibility\afm-config . xml that Web Central uses to find views and web resource files.
How to change search directories
When you change the list of search directories for any file category in afm-config.xml, you need to restart Web Central in order for the new list to be used. In addition, when you change search directories for web resource files (CSS, JavaScript, or image file types), you need to delete the schema-compiled folder. This is required because Web Central adds web resource references into compiled views stored in the schema-compiled folder and does not change the compiled views unless the original AXVW files also change.
How search directories are used
When searching for a file, Web Central makes two passes over the search directory list:
Pass 1:
- For each directory, try looking for the file directly in the directory.
Pass 2:
If the file is still not found:
- For each directory, try searching the file under all subdirectories of the directory;
(This pass is much slower than the first.)
How to optimize search directories
The number and order of search directories directly affects Web Central performance and scalability. Following rules are recommended:
- Never include any ancestor directories of the schema directory. For example, do not include \webapps\archibus or \webapps as a search directory.
- Include search directories in the order of frequent usage. For example, if most of your views use JavaScript fles stored in the schema\ab-products\my-product\my-activity\js folder, include this folder early in the list (but after schema\ab-core\controls folder, because it is used by *all* views).
- Include the schema folder path *last* in the list. It acts as a wildcard search for files that are not found in other search directories.
- You can add search directories that are outside of the schema directory, for example to include references to image files stored on network drive, but be sure that you do not allow access to more folders and files than is necessary. Searching for files on remote file systems is a frequent source of performance problems.