When developing and testing applications with the Genero Web Client, you typically conduct all your development using the Genero Application Server and not the Web server. For production, when including the Web server, certain files need to be relocated to the Web server host.
For a list of the files and directories created during installation, see the Installation - Directory and Files help topic.
For any Genero application, you have to manage multiple files: source code files, their compiled versions, and other files associated with the DVM (.4ad, .4st, and so on). When you display a Genero application using the Genero Web Client, additional files must be managed: templates, snippets, CSS, and JavaScript files.
Four J's recommends that you organize the directory to represent a small local web site, as shown in the example below.
Example
This example provides a simple directory structure for organizing files for a single application. The directory structure and organization can get more complex when you are managing several modules or applications and/or a larger web site, especially when you re-use files across applications.
You should then define an ALIAS that points to the root directory of the local application Web site, as shown in the example below.
Example
<INTERFACE_TO_CONNECTOR> ... <DOCUMENT_ROOT>$(res.path.docroot)</DOCUMENT_ROOT> <ALIAS Id="/mysite">/myApp/web</ALIAS> ... </INTERFACE_TO_CONNECTOR>
In this example, the alias "/mysite" enables access to the files stored in
the directory "/myApp/web/". Using the alias, you can connect to the local web site
using the URI http://<app_server>:6394/mysite/page.html
, where
page.html is in the myApp/web directory.
For deployment, you can copy the entire web site to your Web server, or set a special directory to gather the modified templates. This makes the template configuration in the as.xcf easier.
To avoid breaking links, build the web site with absolute paths. For example, specify "/mysite/img/pic.png" not "../img/pic.png".
The following files can exist on either the application server or the Web server:
Note: Template and snippet files must be located on the application server, as they are used to create the XML (xHTML) file that is passed to the browser.
If you plan to leave the files on the application server only, you should not have to do any alterations to the existing files with the possible exception of the template files. In order for a Web server to access files stored on the application server, $(connector.uri) must be used in front of the directory path for the files listed above. At runtime, $(connector.uri) is replaced by:
To summarize, $(connector.uri) is required to retrieve documents sitting on the application server when going through a Web server.
When moving files from the application server to the Web server, you must:
If you wish to allow access from both the Web server or the application server simultaneously, you should:
By removing the $(connector.uri), as long as the files exist on both the application server and the Web server, you can access the files regardless of the connection type used.
Tips: