Static content base URL property

Official Content
This documentation is valid for:
Indicates the directory where the servlet will search for the static content  (javascritps and images) used in the web objects corresponding to it.  Servlets always execute in the server and thus, this directory must be specified as related to the root directory of the Web server.

Description

Notes:

  • To change the value of this property does not imply regenerating the application, it only implies regenerating a web object. If it is in production, modifying the client.cfg file will be enough.

  • If the value is not indicated in this property, the web server root is assumed (directory “/”).

  • If the image path does not begin with a slash  (“/”), the servlet concatenates the following to build the reference in the html generated: the url to the web server root  + what was specified in this property + what was specified in the properties of the image inserted in the web object; whether they are fixed (i.e.: they have been included with insert/picture) or variable (i.e.: they are loaded with the loadbitmap function). Thus, the path must not be repeated in design and in the property so that the latter is correctly loaded.  

  • If the image path begins with a slash (“/”) it is assumed that it is indicating an absolute path and the property does not apply. 

  • If you want the reference to be absolute instead of relative, for example, you can indicate http://server/statics. In this case, you have to bear in mind that, if you are in a prototyping or testing environment, you need to have access to the indicated URL because otherwise you will not be able to access the static content. The property can be changed at the “client.cfg” file level by changing the entry value WEB_IMAGE_DIR (after doing this, we need to generate again).

Values  

If a directory called “images” is created under the root directory of a web server, and all the required images are copied to this directory, and only the image name is specified in design of the web object, then we should include ‘/images’ in this property.

How to apply changes

To apply changes made by this property, do a Build with this Only of the object.

Scope

Platforms: Web(.Net, Java)