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 Application Designer 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:
JBoss Application Server
<installdir>/server/default/deploy/njx<nnn>.ear/cisnatural.war
Sun Java System Application Server
<installdir>/domains/domain1/applications/j2ee-apps/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.
On Apache Tomcat and IBM WebSphere, Natural for Ajax is delivered as a web application (.war file), in contrast to a J2EE enterprise application (.ear 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 detailed information on this tool, see Using the Configuration Tool in the Natural Web I/O Interface documentation.
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.