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, see 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/ is the path to the public resource directory, where resources such as images are found, see Paths to application resources.

In this example, when accessing the photo.jpeg with the URL http://localhost:6394/ua/i/photo.jpeg, you expect to find the photo.jpeg file in the directory specified by the $(res.public.resources), which expands to $(res.appdata.path)/public/common directory in your application server's application data path.

/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, see 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, i.e. the /webcomponents directory in your application path.