This document covers the following topics:
By default, the configuration file is delivered with the following entries:
<?xml version="1.0" encoding="utf-8" ?> <settings> <global> <last_activity_timeout>3600</last_activity_timeout> </global> <sessions> <session id="Connect to Natural" trace="false"> </session> <session id="localtestserver" trace="false"> <natural_server>localhost</natural_server> <natural_port>6640</natural_port> <natural_program/> <user id="" pwd=""/> <natural_parameter/> </session> </sessions> </settings>
Note:
With Natural for Mainframes, it is recommended to specify the Natural
program that starts the application in the element
natural_program
instead of passing it with the
profile parameter STACK
.
The first session that is defined in the above configuration file has the name "Connect to Natural". This session is automatically preselected in the logon page. Since no further elements are defined for this session, all required input fields for logging on to a session are shown on the logon page and the user has to specify all required information.
Note:
The global
section containing the timeout
value is only available in the configuration file for a Java EE-based server.
See also Setting the
Timeout.
To add a new session definition to the configuration file, you must add
a new session
element. It should have the following
minimum entries:
<session id="your-session-name" trace="false"> <natural_server>your-Natural-server</natural_server> <natural_port>port-ID-of-Natural-server</natural_port> <natural_program>Natural-program-name</natural_program> </session>
The following table explains the elements and attributes that can be
used in the sessions
section of the configuration
file for adding a new session.
Element Name | Attribute Name | Description |
---|---|---|
session |
id |
Mandatory. A session name of your choice. On the logon page, the session name is provided in a drop-down list box. |
session |
type |
Optional. The platform on which user ID and
password are authenticated. Possible values:
Default: "OS". |
session |
protocol |
Optional. The current protocol version for the Natural Web
I/O Interface is 7. The latest Natural versions automatically use the
appropriate protocol version. For older Natural versions, it is required to
define the appropriate protocol version in the configuration file:
Possible values: 2, 3, 4, 5, 6, and 7. Default: 7. |
session |
ssl |
Java EE-based servers only. Optional. If set to "true", a secure connection is established between the Natural Web I/O Interface client on the application server and the Natural Web I/O Interface server. Important: Default: "false". |
session |
trace |
Optional. Should only be set to
"true" when requested by Software AG support. For
further information, see Tracing.
Default: "false". |
user |
id |
Optional. A valid user ID for the current machine. When this attribute is specified, the corresponding field does not appear on the logon page. |
user |
pwd |
Optional. A valid password for the above user ID. When this attribute is specified, the corresponding field does not appear on the logon page. |
user |
encrypted |
Java EE-based servers only. Used by the configuration tool which stores the password in encrypted form. |
user |
ucase |
Optional. If set to
"true", the input field for the user ID is in
upper-case mode.
Default: "false". |
natural_server |
The name or TCP/IP address of the server on which Natural and the Natural Web I/O Interface daemon (Natural for UNIX and Natural for OpenVMS) or the Natural Web I/O Interface server (Natural for Mainframes) or the Natural Web I/O Interface service (Natural for Windows) are running. When this element is specified, the corresponding field does not appear on the logon page. | |
natural_port |
The TCP/IP port number on which the Natural Web I/O Interface daemon (Natural for UNIX and Natural for OpenVMS) or the Natural Web I/O Interface server (Natural for Mainframes) or the Natural Web I/O Interface service (Natural for Windows) is listening. When this element is specified, the corresponding field does not appear on the logon page. | |
natural_program |
When this element is specified, the corresponding field does not appear on the logon page. |
|
natural_parameter |
Optional. Parameters for starting the Natural application. This can be stack parameters, a parameter file/module or other Natural-specific information.
|
|
natural_parameter |
visible |
IIS only. If set to "true", a field containing the Natural parameters is shown on the logon page. Default: "false". |
nattimeout |
Java EE-based servers only. Optional. Timeout for the response from the host. See Setting the Timeout. |
|
theme |
IIS only. The theme (style) that the web page is using. For a first test, you can use the theme with the name "3270Theme" (see Using Themes (IIS only)). When this element is specified, the corresponding field does not appear on the logon page. When themes are shown on the logon page, they are provided in a drop-down list box. |
|
screen |
rows |
Optional. The number of rows in the output window. Possible values: minimum 24, no upper limit. Default: 24. Not used by Natural for Mainframes which uses the profile parameter
|
screen |
columns |
Optional. The number of columns in the output window. Possible values: minimum 80, no upper limit. Default: 80. Not used by Natural for Mainframes which uses the profile parameter
|
screen |
top |
IIS only. The top position of the output window inside the browser. Use "0" for the very top. This value is given in Natural units, not pixels. |
screen |
left |
IIS only. The left position of the output window inside the browser. Use "0" for the very left. This value is given in Natural units, not pixels. |
screen |
size |
IIS only. The size of the output window. Possible values: "normal", "small", "tiny" and "extratiny". Default: "normal". |
screen |
pfkeypos |
IIS only. The position of the PF keys. Possible values: "bottom" and "right". Default: "bottom". Note: |
screen |
showfkeynumbers |
Optional. If set to "true", the PF key numbers are shown next to the PF keys. Default: "false". |
screen |
checknumfields |
If set to "true" (default), numeric input fields are validated. In this case, only the following characters are allowed in numeric input fields (in addition to the numbers "0" through "9"):
blank If set to "false", numeric input fields are not validated. |
If a field is not to appear on the logon page, you can specify the corresponding element or attribute as described above. To do so, you either specify a value for the attribute or element or you omit the value. For example, you can specify either of the following:
<natural_program></natural_program>
or
<natural_program>sysprof</natural_program>
In both cases, the corresponding field does not appear on the logon page.
Only when an element name or attribute name is not mentioned at all, the corresponding field is shown on the logon page.
The following table explains the global settings that can be defined in
the global
section of the configuration file.
Element | Description |
---|---|
last_activity_timeout |
The timeout after the last activity of the user. See Setting the Timeout (Java EE-based servers only) below. |
trace_dir |
Optional. Location of a different trace directory. See Tracing below. |
trustfile_name |
Java EE-based servers only. Optional. The path to your trust file. See Trust Files (Java EE-based servers only) for further information. |
trustfile_password |
Java EE-based servers only. If your trust file is password-protected, the appropriate password is required. The password can only be specified with the configuration tool. It is stored in encrypted form. |
You can set two different timeouts:
Last activity timeout
This is the timeout after the last activity of the user. It is
defined with last_activity_timeout
in the
global
section of the configuration file and is set
in seconds. The default is 3600 seconds (1 hour). When the defined number of
seconds has been reached, the session is closed.
<?xml version="1.0" encoding="utf-8"?> <settings> <global> <last_activity_timeout>3600</last_activity_timeout> </global> <sessions> ...
Natural server timeout
This timeout defines the number of seconds that the client waits for
an answer from Natural after an update of a page was sent to Natural. It is
defined in the nattimeout
element of a session
definition. The default is 60 seconds. Normally, you need not change this
default value. This timeout can be set individually for each session.
... <session id="Test (UNIX)" trace="false"> <natural_server>Myserver2</natural_server> <natural_port>4321</natural_port> <natural_program>test.sh</natural_program> <nattimeout>60</nattimeout> </session> ...
Tracing should only be enabled when requested by Software AG support.
To enable tracing, you set the trace
attribute
in a session definition to "true". Example:
<session id="MySession" trace="true">
By default, the trace files are written to the directory which has
been set by the Java property java.io.tmpdir
. On
Windows, this is normally the environment variable
TMP
for the user who started the application
server. On UNIX, this is normally /tmp or
/var/tmp.
You can also set this property in the start script for the application server. The following examples apply to JBoss.
Example for Windows (run.bat):
set JAVA_OPTS=%JAVA_OPTS% -Djava.io.tmpdir=C:\temp
Example for UNIX (run.sh):
set JAVA_OPTS="$JAVA_OPTS -Djava.io.tmpdir=/tmp
By default, the trace files are written to the Software AG\Natural WebIO\Traces directory. The path to this directory depends on the operating system:
Windows XP
<drive>:\Documents and
Settings\<pc-name>\ASPNET\Local
Settings\Application Data\Software AG\Natural WebIO\Traces
Windows 2003 Server
<drive>:\Documents and
Settings\Default User\Application Data\Software AG\Natural
WebIO\Traces
Windows Vista
<drive>:\Windows\ServiceProfiles\NetworkService\AppData\Local\Software
AG\Natural WebIO\Traces
It is possible to define a different trace directory by defining the
element trace_dir
in the
global
element of the configuration file. Example:
<global> <trace_dir>E:\mytracedir</trace_dir> </global>
When a different trace directory is not defined, the default trace directory will be used.
It is possible to predefine Natural users and their passwords. This is
done in the users
section of the configuration
file.
The syntax is as follows:
<settings> ... <users> <user id="user1" pwd="password1"/> <user id="user2" pwd="password2"/> <user id="user3" pwd="password3"/> </users> ... </settings>
When a Natural page is opened with a URL that specifies a user in the
URL parameter natuser
, the specified user is matched against the
list of users in the configuration file. When the specified user is defined in
the configuration file, the corresponding password is used to authenticate the
user when the Natural session is started. See also
Starting a Natural Application with
a URL.
When the following URL is used, the password defined for "user1" is used (which is "password1" in the above syntax example):
http://myhost:8080/natuniweb/natural.jsp?natuser=user1...