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.
Generally 3 components are required, to execute an InstantWeb application:
Java Standard Edition Runtime Environment (JRE)
Webserver/Servlet Container (Tomcat)
ClassiX® Coordinator
It is described, how these components are setup and how an InstantWeb application is installed.
| 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. |
|
| 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.
|
|
| Provide program files | |
|---|---|
| Conditions to use InstantWeb with ClassiX® and the webserver. |
|
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:
|
| 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.
| 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. |
|
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. |
|
| Java Enterprise Edition SDK | |
|
Der InstantWeb-Generator benutzt j2ee.jar aus dem lib-Verzeichnis unterhalb des Installationsverzeichnis von Java Enterprise Edition. |
|
Wenn die Umgebung zur Entwicklung von InstantWeb-Anwendungen installiert ist, können eigene Anwendungen erstellt werden. Dazu gibt es auch eine entsprechende Anleitung.