Thin Client Installation and Operation

The text below describes an installation and configuration of D2000 TCL for D2000 V9.02.

D2000 TCL installation dependencies


Before installing D2000 TCL, user should do these steps:

  1. Install D2000 V9.02 or higher.
  2. Create a D2000 application.
  3. Create a D2000 user and enable for them the D2000 and TCL authentication method.
    Nastavenie typu autentifikácie pre užívateľa
  4. Install the most recent version of Java JRE, Java SE JRE 7x version is available on http://java.sun.com.
  5. Install the most recent version of Apache Tomcat, 7.x version is available on http://tomcat.apache.org/.

D2000 TCL should be installed and configured manually after installing D2000.

Installation of Thin Client with Tomcat Server


After installing Apache Tomcat, create the folder of Thin Client application with the optional name in main directory of web server, webapps folder (the web server is installed by default in C:\Program Files\Apache Software Foundation\Tomcat X). You may use any name, for example webapps\myApp.
Copy the contents of directory D2000_EXE\tcl\war\ into this folder.

Note: D2000 user must be authorized to log on to the Thin Client.

  1. Copy the files from D2000_EXE\tcl\war\ into the directory of application in web server.
  2. Create a service "tcts.exe --WS<host>:<port>" and Watchdog (WD) for this service.
    <host>:<port> is name of computer (or IP address), on which WEB server runs,
    <port> is number of IP port, on which tcts communicates with servlet (a default is 7120)
    Create a configuration with the utility scsconfig.exe:
    Creating a configuration
    Start tcts service.
  3. Create the service for automatic synchronization of bitmaps "tcldeployer.exe --WS<host>:<port>" and Watchdog (WD) for this service
    Creating the service
    Start tcldeployer service.
  4. If ESL support is required:
    1. Create the service "event.exe /WTCL_LOCAL --SES_LOCAL" and Watchdog (WD) for this service,
      Creating the event.exe
      Start evhtcllocal service.
    2. Create the service "event.exe /WTCL_REMOTE --SES_REMOTE" and Watchdog (WD) for this service, but only if the pictures in the application use the remote ESL scripts.

Parameters given in URL


TCL behaviour can be specified by using the parameters in URL. The following parameters can be set:

__d2tcl__OverrideOpen=picture_name: instance_number
parameter specifies that after a successful login of user the picture_name scheme is opened in the instance_number instance. The instance number is optional, in which case the picture opens in the base (zero) instance. The picture always opens regardless of the setting of the default picture / assembly in the parameters of D2000 user. Parameter can be also written in the abbreviated form !picture_name.

__d2tcl__FallbackOpen=picture_name: instance_number
the picture will open only if the user has no picture / assembly set as the default one in the user parameters. If it does, the default picture in the base instance will open.

__d2tcl__UseCredentials=name:password
parameter allows to automatically log in the user with the name and password without display of the login dialog. In case that the parameter value is specified only name (without a colon), the login dialog will appear prefilled with the name.

__d2tcl__NickName=nickname
parameter allows to name the .SEE D2000 process, which originates by connecting the client and it is used to interpret ESL scripts of displayed pictures. It can be used for debugging an ESL script when it is needed to specify on which .SEE process should the debugging run at.

__d2tcl__AuthMethod=method
parameter allows to set authentication method. Allowed methods are:

It is possible to specify both methods, separated by comma. It this case the 'spnego' authentication is tried first, should it fail, the 'd2000' method is used as the fallback.

If the parameter is not specified, default is 'd2000'.

Feature is available since D2000 release R067


The parameters in URL are entered after '?' character and are separated by '&' character.

Example of URL with parameters:

http://hostname[:port]/myApp/?
__d2tcl__OverrideOpen=S.Main&__d2tcl__UseCredentials=SystemD2000:SystemD2000&__d2tcl__NickName=debugsession1

Alias Configuration


To simplify writing URL can be configured so called aliases. Alias is a named set of parameters, following the '?' character, for example
http://hostname[:port]/myApp/?alias

Alias name can be any text, but it must start with a letter of the alphabet and contain only characters a..z, A..Z, 0..9 a "_". Name is not sensitive to upper / lower case.

If alias is not specified in URL, alias with no name will be used (if there is such one defined).

Moreover, it is possible to define so-called sample alias - with name "*".  The parameters of the model alias will be used as default.

Configuration of each alias is saved in a directory of web application in the web server in file WEB-INF\ d2tcl_config.xml (by default C:\Program Files\Apache Software Foundation\Tomcat X\webapps\myApp\WEB-INF\ d2tcl_config.xml). Example of configuration file d2tcl_config.xml:

 
 <?xml version="1.0" encoding="UTF-8"?>
 <config>
   <alias name="*">
     <param>__d2tcl__UseCredentials=SystemD2000:SystemD2000</param>
   </alias>
   
   <alias name="">
     <param>>__d2tcl__FallbackOpen=S.Main</param>
   </alias>
   
   <alias name="s1">
     <param>__d2tcl__OverrideOpen=S.Section1</param>
   </alias>
	
   <alias name="admin">
     <param>__d2tcl__UseCredentials=</param>
     <param>!S.Admin</param>
   </alias>
 </config>
  


Start a tcts (Installation of Thin Client with Tomcat Server section, step 2).

Start a tcldeployer (Installation of Thin Client with Tomcat Server section, step 3).

To start the picture with ESL script, user must start a SES (Installation of Thin Client with Tomcat Server section, step 4).

Warning: If user wants to start two processes event.exe (one with the parameter --SES_LOCAL and second one with the parameter --SES_REMOTE), the process started as second must contains the parameter /W[name], for example event.exe /Wremote --SES_REMOTE.

The picture will be displayed in the internet browser after entering this address:

http://hostname[:port]/myApp/[?alias]

hostnameIP address or computer name on which Apache Tomcat runs.
portPort number for connection to Apache Tomcat through HTTP(S). If port = 80, the user need not enter it.
myAppDirectory name in the main directory of Apache Tomcat (folder of Thin Client application).
aliasAlias name from configuration file. If the alias is entered, it must follow the "?" character.

If the picture is not opened, when first starting the Thin Client, try to restart both the web server and tcts.exe process.

Example of URL with alias "http://localhost/myApp/?s1"

Example of URL without alias: "http://localhost/myApp/?!S.Section1"

URL with alias will perform automatic login, URL with no alias will open login dialog first, then both URL will open the same picture.

TCL upgrade to a newer version


Before TCL upgrading to a newer version, a user must do these steps:

  1. Stop Apache Tomcat process (windows service).
  2. Finish upgrading the existent instance D2000 V9.02.
  3. Create a backup of custom directory and the files WEB-INF/*.xml.
  4. Copy the files from D2000_EXE\tcl\war\ into the application directory on the web server.
  5. Replace / update the custom directory from the backup.
  6. Check the differences between backup files WEB-INF/*.xml and the new installation. As necessary, upgrade the files WEB-INF/*.xml from the backup or merge them.
  7. Start Apache Tomcat process (windows service).

Running multiple TCL instances on one instance of Tomcat server


There is possible to use one Tomcat server instance for running multiple TCL instances at the same time. The settings of the first TCL instance is done according to the steps mentioned above. The deployment of each next TCL instance TCL requires the following procedure:

  1. Stop Tomcat server.
  2. Copy the files from D2000_EXE\tcl\war\ into the application directory on web server (the directory name must be reserved for this TCL instance, e.g. webapps\mojaNovaApp.
  3. Create the service "tcts.exe --WStomcatHost:port" and Watchdog (WD) for this service.
    tomcatHost is a server name, on which Tomcat instance runs,
    port is an idle number of communication port between tcts and D2WTC, e.g. s7121, 7122, 7123, ..
    The first TCL instance uses the port 7120, unless specified in other way.
  4. Create the service "tcldeployer.exe --WStomcatHost:port" for the automatic synchronization of bitmaps and Watchdog (WD) for this service. The port number is the same as mentioned in the step 3.
  5. The configuration of port of deployed application on the application server means the servlet-init of the parameters. In this case, the number of D2000 communication port is entered as init parameter for the servlets GWTTCLServiceImpl and GWTTCLServiceImpl2 in the files WEB-INF/web*.xml.

    An example of configuration:

      <servlet>
        <servlet-name>GWTTCLServiceImpl</servlet-name>
        <servlet-class>sk.ipesoft.d2wtc.servlet.D2WASServiceImpl</servlet-class>
        <init-param> 
         <param-name>d2000_servlet_log_dir</param-name>
         <param-value></param-value> 
        </init-param>
        <init-param> 
         <param-name>d2port</param-name> 
         <param-value>7121</param-value>
        </init-param>
       <load-on-startup>1</load-on-startup>
      </servlet>
    
  6. Create the service event.exe as necessary.
  7. New TCL instance will be available on URL:
    http://hostname[:port]/mojaNovaApp/[?alias]

D2000 Thin Client
Drawing Rules