Setup isac-web

Setting up isac-web as a project in the NetBeans IDE follows the steps below; detailed explanations can be found in Tom Zillinger's thesis. The repository's changesets 5f1e2c54f4a2, f178b5a859e1 and b8908a778d02 relate code and setup to the thesis.

The steps below comprise much of what is required for understanding the mechanisms involved. So some of them are done already by respective files tracked in the repository.

Legend: (RM) is "right mouse"

Install auxiliary software
Here is assumed you already have installed all software required by isac-java. Because web tools depend on frequent security updates we recall that ISAC, as a prototype development, does not catch up with the latest software releases; in particular

Java 1.6 and not with higher versions. Be sure to use the same version 1.6 of Java Web Start if addressed below.
 * (1.1) Present isac-java only runs on version


 * (1.2) Install NetBeans IDE (>= 8.0 required), this requires Java >= 7.0 (wrt. (1.1) observe the different Java versions).

https://glassfish.java.net/downloads/3.1.2.2-final.html and use the ZIP archive.
 * (1.3) Install the web application server GlasFish. As long as ISAC runs on Java_1.6, a specific GlasFish version is required; download from

NetBeans > Windows > Services > Servers (RM) > GlasFish leading to the respective installation whizzard: "domain1" is left as is_> "GlasFish 3.1.2.2" is the appropriate version
 * (1.4) Install GlasFish in NetBeans IDE (>= 8.0 required) by the menue items

NetBeans > Tools > Servers The whizzard opens, you click Add Server and set Domain Location: "Local Domain"
 * (1.4) Add GlasFish Server as a server in NetBeans IDE:

Configure the NetBeans project for isac-web
Here we describe one possible configuration in detail for simple reference in the sequel; in particular, we shall reference the directory structure; some indispensable files are outside the repository, some even outside the project.

Presently we have NetBeans version 8, which requires Java 7 (while ISAC still runs with Java 1.6). The source files for isac-web have been downloaded already, so we proceed alongside the steps of the NetBeans whizzard as follows

Project Name: /home/MYUSERNAME/proto3/repos/isac-web
 * (2.0) NetBeans > File > Open Project


 * (2.1) Select isac-web and check [x] : isac-java


 * (2.n) TODO

Sign components and provide security settings
Explanations for the steps below are to be found in Tom Zillinger's thesis in section 4.9.

ISAC uses Java KeyStore (JKS) as repository of security certificates. Preliminarily self-signed certificates are used.

isac-java$ keytool -genkeypair -dname "cn=isac, ou=isac, o=isac, c=AT" -alias isacjava -keypass isacjava -keystore isacjava.ks -storepass isacjava -validity 3600 The last number declares the days until expiration. Later, when ISAC will be used professionally, the "self=certificate" bill be replaced by an "enterprise certificate".
 * (3.1) Create a keystore following these guidelines:

isac-java$ keytool -keystore isacjava.ks -list
 * (3.2) The above command creates "isac-java/isacjava.ks", which can be inspected by

NetBeans > isac-java project (RM) > Properties > Web Start opens a window, there click the checkbox and the activated "Customize" (and leave other fields as is) [x] Enable Web Start Customize which again opens a window; this gets these entries: : (x) Sign by a specified key Keystore Path     isacjava.ks Keystore Password: isacjava Keystore Alis:    isacjava Key Password:     isacjava Mixed .. 
 * (3.3) Sign the components of "isac-java/dist" to be deployed by isac-web:

    The relevant lines are   which include "isac-java/dist/isac-java.jar" and all libraries in "isac-java/dist/lib". The latter is simple, but definitely to much, see Setup_isac-web. After the prototype has stabilised, the could specify the two libraries acutally required.
 * (3.4) The above settings create the following entries in isac-java/nbproject/jnlp-impl.xml:

isac-java Files > dist > isac-java.jar > META_INF should contain these files: INDEX.LIST ISACJAVA.DSA ISACJAVA.SF MANIFEST.MF
 * (3.5) Inspect success of signing and look up the respective components, for instance

Copy resources from isac-java to isac-web
This step could be automated in the project setup, but presently these manual steps are required:

cp /home/MYUSERNAME/proto3/repos/isac-java/dist/isac-java.jar /home/MYUSERNAME/proto3/repos/isac-web/web/WEB-INF/resources/jnlp/
 * (4.1) After any update in isac-java:

cp /home/MYUSERNAME/proto3/repos/isac-java/dist/lib/commons-cli-1.2.jar /home/MYUSERNAME/proto3/repos/isac-web/web/WEB-INF/resources/jnlp/lib/ cp /home/MYUSERNAME/proto3/repos/isac-java/dist/lib/log4j-1.2.11.jar   /home/MYUSERNAME/proto3/repos/isac-web/web/WEB-INF/resources/jnlp/lib/ cp /home/MYUSERNAME/proto3/repos/isac-java/src/java/properties/WindowApplication.properties /home/MYUSERNAME/proto3/repos/isac-web/web/WEB-INF/resources/jnlp/ The latter file that will be downloaded via JNLP to the clients from which the WindowApplication will be started, which in turn will download the WindowApplication.properties file. Note, that the library files are copied from dist/ (and not from isac-java/lib), because these are determined to be signed, see Setup_isac-web (3.3).
 * (4.2) In the (rare) case of respective updates don't forget

Configure the application server Glassfish
TODO during next setup from scratch Configure Glassfish to deploy the isac-web.war file and copy the glassfish-resources.xml configuration:


 * (5.1)  cp TODO/../glassfish-resources.xml TODO/../<>/domains/<>/domain.xml

This is sufficient for starting the Glassfish server for development. As soon as the installation needs to be deployed to a remote server (a J2EE compliant server) then the isac-web.war file needs to be copied manually and the contents of the glassfish-resources.xml needs also to be configured in the companies Glassfish’s domain.xml file.

Make isac-java's UserLogger a web-service
isac-java can run a UserLogger which logs the users' steps in problem solving. isac-web provides web-access to the UserLogger, although this is not required for web-access of the WindowApplication; rather, web-access for the UserLogger waits for re-use by tools for dialogue authoring.

Web-services are provided by GlassFish; the settings for the UserLogger are in isac-web/setup/glassfish-resources.xml, which are tracked in the repository. The above setup of GlassFish prepared this file, so it needs no adaptiation; the relevant details are:       <property name="driverClass" value="com.mysql.jdbc.Driver"/> These lines configure the properties for the jdbc-connection-pool such that NetBeans automatically finds UserLogger

Windows > Services > Databases Clicking Databases now finds the userlogger automatically, which is shown by a new entry "jdbc:mysql ...".
 * (6.1) Establish the connection between web-server and UserLogger: open the Services window parallel to the Projects and Files windows from the NetBeans menue:

Windows > Services > Databases > MySQL Server at ... (RM) > Start which asks for the root password of your computer. Click away the window "MySQL Server Properties" although it shows "Connection refused".
 * (6.2) Start the UserLogger by

Windows > Services > Databases > "jdbc:mysql ..." (RM) > Connect which asks for the UserLogger's password "isac". Now this entry also can be used for quick inspection of the UserLogger.
 * (6.3) Connect GlassFish with the UserLogger by clicking the entry

/home/MYUSERNAME/proto3/repos/isac-java/src/java/properties/ObjectManager.properties
 * (6.4) In case of changes: the UserLogger's properties relevant for isac-java are in

Start isac-web in the development environment

 * (7.1) Start isac-java following Setup_isac-java (5.1) rmiregistry and (5.2) BridgeMain, KEStore and ObjectManager; WindowApplication can be started, isac-java and isac-web work in parallel.

$ sudo /opt/lampp/lampp start $ cd /opt/lampp/bin > ./mysql -uroot Once at installation or redefinition of DB: typing into DB prompt: > source /home/wneuper/proto3/repos/isac-java/src/sql/UserLogger.sql
 * (7.2) Start the database (which is not started automatically by NetBeans like GlassFish)

isac-web project (RM) > Run this takes some time, what is going on can be watched in the three output windows: Output - isac-web (run): "deployment" copies files etc and generates isac-web.war Java DB Database Process: UerLogger is started as well GlassFish Server: opens a specific window in the browser.
 * (7.3) Start isac-web

exp_IsacCore_Tests_1a exp_IsacCore_Tests_1b exp_IsacCore_Tests_1c exp_IsacCore_Tests_1d The example can be started in two ways, by (1) a "Direct_Link" or a "Launch"-Button. The latter has the advantage, that it checks for Java-installation on the client side and installs if required.
 * (7.4) In your standard browser the page "Welcome to Spring Web MVC project" (?!?) has been opened. This window still reflects the motivation of IICM at TUG to use isac for a web-based assessment tool MASS. It is just for demonstration purposes, 4 different examples can be started, which are named


 * (7.5) Start the ISAC front-end: clicking one of the examples activates Java Web Start; go sure, that Web Start uses version 1.6, otherwise nothing works. Web Start uses the settings in isac-java.jnlp.


 * (7.6) Java Web Start fetches isac-java's WindowApplication together with the respective properties and libraries from the isac-server addressed by the url clicked in (7.5). This url  is designed for sending data for authorisation, of a mode (e.g. "assessment") and of a pointer to the example.


 * (7.7) In ISAC's front-end you find the example clicked in a worksheet ready for interactively solving it.


 * (7.8) Further examples can come from a web browser, for instance (7.3) or from the "Example"-Browser in ISAC's front-end; in both cases these examples are run in the same session. This architecture allow to set modes ("exploration", "exeercise", "assessment", etc) for this session and to control it.

http://www.ist.tugraz.at/projects/isac/www/kbase/exp/exp_IsacCore_Tests_web.html However, this page is not yet connected with an isac-server.
 * (7.9) There is one testpage at

Add a domain authorized to use isac-web
isac-web has a more general authorisation scheme than isac-java. The schemes concerns basics in architecture and, as prototype implementations, observe neither encryption nor usability issues for administration.

The authorisation scheme of isac-java simply comprises username / password; for each user, let's say "XY" three files are generated manually: XY_admin.txt: data for personal administration like semester etc XY_model.txt: the history of the personal dialogue model XY_settings.txt: settings concerning technical aspects like background colour, language etc. All these files contain preliminary fields.

The authorisation scheme of isac-web anticipates three kinds of users:
 * 1) Students using an LMS like moodle, administered by some institution
 * 2) Learners with individual access
 * 3) Anonymous users, for instance using a wiki with links, which download ISAC's frontend as described above in (7.4)..(7.7).

Changeset b20580b6e1e5 shows how fh-hagenberg has been added as case 1.