Back to Contents | GAS Configuration File Overview
The Picture component defines how images are served. A Picture component is referenced in an application by its unique identifier, set by the Id attribute.
The WEB_APPLICATION_PICTURE_COMPONENT element specifies the directory from which images are served. It takes an attribute Id, which specifies the unique identifier for this Picture component. It is this unique identifier that is referenced by an application, providing that application with the location of its image directory.
You need to specify only the alias to the picture directory. The mapping between the alias and the physical directory where the images are stored is defined in the INTERFACE_TO_CONNECTOR element. For more information on setting up aliases, refer to the Aliases section of this manual.
<WEB_APPLICATION_PICTURE_COMPONENT Id="resID">
<PATH>$(connector.uri)aliasPath</PATH>
</WEB_APPLICATION_PICTURE_COMPONENT>
<WEB_APPLICATION_PICTURE_COMPONENT Id="cpn.picture">
<PATH>$(connector.uri)/fjs/pics</PATH>
</WEB_APPLICATION_PICTURE_COMPONENT>
Note: The Front End clients use $(pictures.uri) in their templates to access the pictures. This corresponds to the picture component path: $(connector.uri)/fjs/pics.
The path to the pictures must specify an alias. The alias would be defined in the INTERFACE_TO_CONNECTOR element:
<INTERFACE_TO_CONNECTOR><TCP_BASE_PORT>6300</TCP_BASE_PORT>
<TCP_PORT_OFFSET>94</TCP_PORT_OFFSET>
<DOCUMENT_ROOT>$(res.path.docroot)</DOCUMENT_ROOT>
<ALIAS Id="/fjs/pics">$(res.path.pics)</ALIAS> </INTERFACE_TO_CONNECTOR>
Tip: When creating your html pages, use the absolute alias path to html objects like images or JavaScript files; for example, use /fjs/pic/accept.png rather than ../pic/accept.png. This saves time when moving from a development environment (direct connection to the GAS) to a production environment (connection through a web server).
The PATH element specifies the URL for the directory where the images reside. This URL typically consists of the Web server directory resource combined with an alias for the image directory.
Refer to the discussion under WEB_APPLICATION_PICTURE_COMPONENT for more information on defining the PATH element.