File serving URIs

You can determine the file system location of resources specific to your deployed applications on the GAS from the application URL of a request. Examples are given for document root, public images, and web components.

If the application URL is given as http://localhost:6394/demos.html) , you can locate various resource as described in Table 1.

Table 1. File serving URIs
URI path Description
/ The slash (/) is the path to the document root configured in the Genero Application Server (GAS) configuration file. The DOCUMENT_ROOT element is located at /CONFIGURATION/APPLICATION_SERVER/INTERFACE_TO_CONNECTOR/DOCUMENT_ROOT.
For example, this excerpt is from the default GAS configuration file (as.xcf).
...
 <RESOURCE_LIST>
  <PLATFORM_INDEPENDENT>
   ...
   <RESOURCE Id="res.path.docroot" Source="INTERNAL">$(res.path.as)/web</RESOURCE>
   ...
  </PLATFORM_INDEPENDENT>
 </RESOURCE_LIST>
 ...
 <INTERFACE_TO_CONNECTOR>
  ...
  <DOCUMENT_ROOT>$(res.path.docroot)</DOCUMENT_ROOT>
  ...
 </INTERFACE_TO_CONNECTOR>
...

When calling the demo page using the URL http://localhost:6394/demos.html, you expect to find the demos.html file in the directory specified by the DOCUMENT_ROOT entry. This is the /web directory in your application server path.

/ua/i/

In this URL the slash (/) following the ua/i/ begins the path to the public resource directory where applications' public images are found.

The public resource directory is set by $(res.public.resources) in the as.xcf file. It is typically set to common, which expands to the $(res.appdata.path)/public/common directory in your application data path. The PUBLIC_IMAGEPATH that is used by all applications is set to $(res.public.resources) by default.

For example, an image put in this path can be found at:
http://localhost:6394/ua/i/common/my_photo.jpeg
If you deploy an application with public images , they are put in its deployment path, $(res.appdata.path)/public/deployment/my_gar_file. The $(res.public.resources) is updated to include this path (as well as common) in a search for images. Images may then be found at a URI of the form:
http://localhost:6394/ua/i/public/deployment/my_gar_file/my_deployed_photo.jpeg
The images in common are also accessible.
/ua/components In this URL the slash (/) following the ua/components/ is the path to the web component directory configured in the Genero Application Server (GAS) configuration file where web components are found. The WEB_COMPONENT_DIRECTORY element is located at /CONFIGURATION/APPLICATION_SERVER/WEB_APPLICATION_EXECUTION_COMPONENT/WEB_COMPONENT_DIRECTORY .
For example, this excerpt is from the default GAS configuration file (as.xcf).
 ...
 <WEB_APPLICATION_EXECUTION_COMPONENT Id="cpn.wa.execution.local">
  ...
      <WEB_COMPONENT_DIRECTORY>$(application.path)/webcomponents</WEB_COMPONENT_DIRECTORY>
  ...
 </WEB_APPLICATION_EXECUTION_COMPONENT>

...

In this example, when accessing a web component with the URL http://localhost:6394/ua/components/mywebcomponent, you expect to find the file in the directory specified by the WEB_COMPONENT_DIRECTORY entry, which is the /webcomponents directory in the sample path.