URL Search Path/URL Generation
One key feature of the CW Framework API is that it sets up the search path for finding files so common files can be shared, custom versions of files can override, and URLs are generated correctly. The search path that is setup is based on the CW web application (tool) id. The framework will search for files in the following order:
- Application test directory (and first-level subdirectories) – if user preference is set for using common test directories.
- Application custom directory (and first-level subdirectories)
- Application standard directories - img, code, xsl, help, jsp
- Common test directory (and first-level subdirectories) – if user preference is set for using common test directories.
- Common custom directory (and first-level subdirectories)
- Common standard directories – img, code, xsl, help, jsp
The paths for the URLs and directories for each of the above are specified in the registry. See the CW Install/Configuration Reference for more information on the specific registry settings and default values.
CWUserConfig provides the following key methods for generating URLs:
findURL– returns a URL given a file namegetXMLURLMap– returns the file->URL map as XMLfindWebToolURL- returns the URL for a given web tool command line- Note, these methods also encapsulate the generation of SSL prefixes and URL encoding.