Installing InstantWeb

The following explains the installation of InstantWeb applications / of the necessary environment for the development of such applications. The statements are accordingly divided. First comes the installation guide for the necessary runtime environment to use InstantWeb applications. Based on this the instructions to install additional components, in case proprietary applications shall be developed. All paths and URLs are just examples and therefore have to be adjusted to the concrete requirements, where applicable.

Inhalt

InstantWeb runtime environment

Generally 3 components are required, to execute an InstantWeb application:

It is described, how these components are setup and how an InstantWeb application is installed.

Setup Java

Java Standard Edition (JRE)
The Java code that is provided with an InstantWeb application is already compiled to Java byte code in several .jar files. The coordinator only requires a Java runtime environment, therefore, JRE is sufficient. The code has been tested with Java 1.6.0.
 
  1. Install the latest JRE from  Ecterne Verknüpfunghttp://java.sun.com. It is recommended to use the standard path C:\Programme\Java\... . Alternatively, it is also possible to install a JDK, since it contains a JRE.
  2. The installation program should also complement the environment variable PATH with the sub-directory "bin" in the Java installation directory. Also check this and nachholen if required. Standard directory: C:\Programme\Java\jre<Version>
  3. To Test: execute java -version in console.

Setup webserver/Servlet Container

Install Tomcat
InstantWeb requires a webserver including a servlet container, to provide the dynamically generated website. Tomcat is used representatively, JRun has also been tested successfully.

 

  1. Download Tomcat under  Ecterne Verknüpfunghttp://tomcat.apache.org/ and install it. It is recommended to use the installer. Java should be installed before Tomcat! A username and password for administration has to be specified during installation.
  2. Tomcat can be started right after installation (the installation program provides an according option), or the monitor program (in the new program group "Apache Tomcat" in the start menu) is used, to execute the service. After the start, the monitor program appears in the sytem tray. A context menu can be opened via right-click, enabling Tomcat start and -stop.
  3. Test: Call Tomcat Manager application (according link in the start menu program group). Then, the username and password, which have been specified during installation, have to be used to login. If the Tomcat Manager application appears now, the installation has been successful.

Setup ClassiX®

Provide program files
Conditions to use InstantWeb with ClassiX® and the webserver.
  1. Binary version 4.4 or later.
  2. The directory %CX_ROOTDIR%\InstantWeb\lib has to  contain these files:
    • CXCoordinator.jar
    • kxml.jar

Install InstantWeb application

The following guide refers to the attached sample application. For individual web applications, the files need to be adjusted to the according requirements.

 

Configure Coordinator
There is a configuration file for the coordinator for each web application. For proprietary web applications, it can be geared to the exemplary configuration. The according configuration file for the attached sample application is in the application directory under %CX_ROOTDIR%\InstantWeb\Evaluate\<Webanwendung>. The path to the Evaluate directory eventually has to be adjusted here in two positions, noticeable in the standard path "Y:\classix\Evaluate\..."
To start the coordinator, it is necessary to generate a system-specific batch file. As the example shows, this file might need to be adjusted the individual web applications. According batch files for the attached sample applications can be found under  %CX_ROOTDIR%\InstantWeb\Evaluate. In case CX_ROOTDIR does not conform with the standard "Y:\ClassiX\Evaluate", the batch files should be adjusted and  CX_ROOTDIR should be set accordingly.

The coordinator can be started with the according file *_Web_START.bat and closed with the general file Evaluate_Web_STOP.bat.

Deploy InstantWeb application
The complete InstantWeb application is in a  ".war" archive. So the webserver can display the according pages, the pages have to be available for the webserver.

 

The sample applications are in the according *.war files in the application directory. These files need to be copied into the "webapps" directory under the installation Tomcat directory. Tomcat recognizes, that a new web application has been deplovt and unpacks the archive independently. Information: Older Tomcat versions only recognize this after restarting it.
Adjust Java safety settings
Java controls the access to resources via so-called  Security Policies. The coordinator either gets

Either the Entweder wird dem Koordinator pauschal ein gesamter Zugriff gegeben, oder es werden nur die benötigten Ressourcen freigegeben. Auch diese Datei muss für eigene Webanwendungen entsprechend angepasst werden, dabei kann sich einer beispielhaften policy-Datei orientiert werden.

Die Beispielanwendungen liefern jeweils eine eigene policy-Datei mit, welche sich auch im Verzeichnis der Anwendung unterhalb von %CX_ROOTDIR%\InstantWeb\Evaluate befindet (*.policy). Hier müssen evt. auch die Pfade entsprechend angepasst werden.

Alternativ kann auch der Zugriff für Webanwendungen pauschal freigegeben werden:

  1. In <JRE-Installationsverzeichnis>\lib\security\java.policy in dem Block "grant {}" folgende Zeile an den Anfang einfügen:
        permission java.security.AllPermission;
  2. Diesen Schritt für ein eventuell installiertes JDK in dessen Installationsverzeichnis wiederholen.

Starten der Webanwendung

Start webserver
In case Tomcat is not running, yet, it needs to be started now. Über den Tomcat-Monitor kann der Dienst gestartet werden (Rechtsklick auf das Tray-Icon ergibt ein entsprechendes Menü). Falls die Variante ohne Installer genutzt wird, kann Tomcat über den Aufruf von catalina.bat start im bin-Verzeichnis unterhalb des Installationsverzeichnis gestartet werden. Das Stoppen erfolgt analog: Entweder auch über das Monitor-Tray-Icon oder den Aufruf von catalina.bat stop
Start ClassiX® Coordinator
Now, the coordinator has to be started. ClassiX® über die Startbatch (WEB_START.bat) starten, nach einiger Zeit sollte die Meldung "ClassiX successfully initialized" erscheinen. Über WEB_STOP.bat kann er Koordinator wieder gestoppt werden. Siehe hierzu auch oben die Erläuterungen zu den Batch-Dateien unter "Koordinator konfigurieren".

In einem Browser kann nun die InstantWeb-Anwendung aufgerufen werden über "http://localhost:8080/<Webanwendung>"

Die URL setzt sich zusammen aus dem Hostnamen des Rechners, auf dem Tomcat läuft (in diesem Fall "localhost", allerdings muss Tomcat nicht zwangsweise auf demselben Rechner wie der Koordinator laufen), dem von Tomcat verwendeten Port (hier der Standardport "8080", diese kann jedoch auch entsprechend der Anweisungen in der Tomcat-Dokumentation umkonfiguriert werden) sowie dem Namen der InstantWeb-Anwendung (entspricht dem Namen der .war-Datei).

Die Beispielanwendung "PhoneList" mit der zugehörigen .war-Datei "Evaluate_PhoneList_Web.war" kann also über http://localhost:8080/Evaluate_PhoneList_Web aufgerufen werden.

Nach dem Start des Koordinators werden die Meldungen in einem Konsolenfenster ausgegeben. Dies geschieht zu Debug- und Logging-Zwecken. In einer späteren Version von InstantWeb wird es auch möglich sein, den Koordinator als Dienst ähnlich wie Tomcat laufen zu lassen und somit das Konsolenfenster zu verstecken.

Security: SSL encryption

Tomcat & SSL
'Normal' data traffic is processed in the WWW via http protocols. Data is transferred in an encrypted form. To increase data security, we recommend to setup the webserver, here Tomcat, in a way, that data is only delivered via encrypted protocol https. The following link shows, how the Tomcat needs to be configured for this. Ecterne Verknüpfunghttp://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

InstantWeb development environment

Wenn eigene Webanwendungen erstellt werden sollen, dann werden einige zusätzliche Komponenten benötigt:

Anstelle des JRE wird nun ein Java Development Kit benötigt. Es sind also alle Installationsschritte wie oben auszuführen, nur das anstelle des JRE ein JDK entsprechend untenstehender Anleitung installiert wird. Das JDK enthält auch immer ein JRE, weshalb die Installation des JRE nicht mehr nötig ist.

Java Standard Edition (JDK)

Um eigene Webanwendungen zu erstellen, wird ein Java-Compiler sowie alle zugehörigen Bibliotheken benötigt.

  1. Das neueste JDK von  Ecterne Verknüpfunghttp://java.sun.com installieren.
  2. Das Unterverzeichnis "bin" im Installationsprogramm sollte in die Umgebungsvariable PATH aufgenommen werden. Dies muss manuell gemacht werden. Standardverzeichnis: C:\Programme\Java\jdk<Version>
  3. Zum Testen: javac in einer Konsole ausführen (die Hilfe des Java Compilers wird ausgegeben)
Java Enterprise Edition SDK

Der InstantWeb-Generator benutzt j2ee.jar aus dem lib-Verzeichnis unterhalb des Installationsverzeichnis von Java Enterprise Edition.

  1. Es wird empfohlen, Java EE auch unterhalb des Standardverzeichnisses C:\Programme\Java (z.B. C:\Programme\Java\jee5_02) zu installieren und nicht in das vom Installationsprogramm vorgeschlagene Verzeichnis.
  2. Das neueste Java EE SDK von  Ecterne Verknüpfunghttp://java.sun.com herunterladen und das Installationsprogramm starten. Der Java EE Applikationsserver wird nicht genutzt und sollte daher vom Installationsprogramm auch nicht gestartet werden. Ebenfalls sind die Angaben für Benutzer und Passwort des Serveradministrators unerheblich und können beliebig gesetzt werden.
  3. Die Umgebungsvariable J2EE_HOME muss auf das J2EE-Installationsverzeichnis gesetzt werden.

Wenn die Umgebung zur Entwicklung von InstantWeb-Anwendungen installiert ist, können eigene Anwendungen erstellt werden. Dazu gibt es auch eine entsprechende Anleitung.