This document covers the following topics:
A Natural for Ajax application consists of two parts that are usually installed on two different machines.
On one hand, there are Natural modules (adapters, programs, subprograms and other Natural objects) that are installed on a Natural server. On the other hand, there are page layouts of rich GUI pages and related files that are installed in a Natural for Ajax environment on an application server.
The Natural modules that belong to your application are contained in one or several Natural libraries in your Natural development environment. Unload them into a file, using the Object Handler.
In order to install the Natural modules in the production environment, load them with the Object Handler.
The user interface components of your application are contained in one or several Application Designer projects in your Natural for Ajax development environment on your development application server.
All files in your project are stored in one directory on the application server on which Natural for Ajax is installed. The name of the directory corresponds to the project name you have chosen. The location of the directory depends on the application server. Example for JBoss Application Server:
<installdir>/server/default/deploy/njx<nnn>.ear/cisnatural.war
where <installdir> is the directory in which your application server is installed and <nnn> is the current Natural for Ajax version.
The project directory contains a number of subdirectories, only some of which need to be deployed to the production environment. <projectdir> in the table below stands for the name of your project directory. Pack the following files and subdirectories into an archive, using an archiving tool like WinZip or tar.
File | Description |
---|---|
<projectdir>/*.html | Generated HTML pages. |
<projectdir>/xml/*.* | Page layouts. |
<projectdir>/wsdl/*.* | Page data schemas. |
<projectdir>/accesspath/*.* | Page data access definitions. |
<projectdir>/multilanguage/*.* | Language-dependent strings. |
<projectdir>/help/*.* | Language-dependent help texts. |
In order to install the user interface components, unpack the previously created archive into a corresponding project directory in your Natural for Ajax production environment on your production application server.
When redeploying a user interface component or parts thereof, make sure that server-side caches are properly cleared. The clean way to achieve this is reloading the Natural for Ajax application on the application server or web container. The servers provide appropriate means in their administration tools. With Tomcat, for example, the Tomcat Manager can be used to reload the web context. With JBoss, the JBoss JMX console can be used.
To reload the web context on Tomcat
Open your web browser and enter the following URL:
http://<host>:<port>/
Choose the link Tomcat Manager.
In the line cisnatural, choose the link Reload.
To reload the web context on JBoss
Open your web browser and enter the following URL:
http://<host>:<port>/jmx-console/
In the section jboss.web.deployment, choose the link war=/cisnatural.
Invoke the function stop()
.
Invoke the function start()
.
In a development environment, the System Management functions of Application Designer's monitoring tool can be used to perform the necessary refresh. For detailed information on the monitoring tool, see Development Workplace in the Application Designer documentation. The latest version of the Application Designer documentation is available at http://documentation.softwareag.com/webmethods/application_designer.htm (Empower login required).
On Apache Tomcat and IBM WebSphere, Natural for Ajax is delivered as a web application (.war file). This allows for packaging and deploying also your own applications (more exactly: the user interface components thereof) as self-contained web applications.
To package your application as a web application
Invoke the Application Designer development workplace.
In the Development Tools node of the navigation frame (which is visible when the button has previously been chosen), choose WAR Packager.
In the resulting dialog, make sure that the Deployment Scenario tab is selected.
Define the generation type by selecting one of the following option buttons: with file system reference or fully clusterable. See the Application Designer documentation for detailed information on these generation types.
Note:
The option fully clusterable applies only
for web applications written in Java, not for those written in Natural. This is
because a Natural-written application runs on a Natural server and therefore
needs to keep a TCP/IP connection to the server, while Java applications are
executed on the web container itself.
If you selected with file system reference, enable the Switch off Design Time check box.
Select the Project Selection tab.
Select the project directories that you want to include in your web archive. These must be at least the following:
Directory | Description |
---|---|
cis | Application Designer configuration files. |
cisnatural | Natural for Ajax logon page and related pages. |
HTMLBasedGUI | HTML user interface. |
images | Application Designer image files. |
META-INF | Standard directory in a web application. |
resources | Natural Web I/O Interface style sheets and related files. |
scripts | Natural Web I/O Interface JavaScript files. |
SWTBasedGUI | SWT user interface. |
WEB-INF | Standard directory in a web application. |
In addition, you have to select your own project directories.
In the text box WAR File to be created, specify a path and name for the web application to be created.
Choose the Create WAR button.
The web application (.war file) is created.
To deploy your application
You deploy your web application in the same way as you deployed Natural for Ajax itself (see Installation).
After you have deployed your web application, you can use the configuration tool to specify the configuration for this specific application. For further information, see Using the Configuration Tool.
Start the configuration tool with the following URL:
http://<host>:<port>/<webcontext>/conf_index.jsp
The logon page of the application can be found here:
http:// <host>:<port>/<webcontext>/servlet/StartCISPage?PAGEURL=/cisnatural/NatLogon.html
Note:
<webcontext> denotes the web
context of your application. On Apache Tomcat, this is the name of the
.war file, without the extension
.war. On IBM WebSphere, this is the value you specified as
the web context during the deployment.
You can generate HTML pages using the command line (either single pages or entire projects). An Ant file named generate.xml is available for this purpose. After the installation, you can find it in the support/ant directory.
The Ant file has the following major targets:
info
Shows the syntax of this Ant task.
project
Generates all HTML pages for a given project.
page
Generates a single HTML file for a given page in a project.
pages
Generates HTML files for given pages in a project.
style
Generates CSS files for info files in a project
The following call explains the targets with their mandatory and optional parameters:
ant -f generate.xml info