Deploying Batch Results
The uploadThis folder
The results of running a batch are contained within the folder batch/uploadThis. The uploadThis folder contains:
- configuration.xml - a copy of the standard configuration
- diagram - a folder which contains all of the generated diagram files
- Diagrams.war - the application which displays the class diagrams
- icon - the icons used in the display of class diagrams
- Index.war - the application which displays the index
- index.xml - the index data
- jt.jar - the Jetty webserver which builds and serves the class diagrams as they are viewed
- model - java element information
- runserver.bat - a windows batch file to start the server
- runServer.sh - a unix script to start the server
- stamp - small images of the class diagrams displayed in the index
Local Deployment
It is a good idea to check the contents by running locally first, at least for the first couple of times you run a batch.
Note that:
- By default, port 8080 will be used to run the server.
- Jetty requires JDK 1.6 to run
Unix
- From a command prompt change directory to batch/UploadThis
- Make the startup script executable by doing chmod +x runServer.sh
- Do ./runServer.sh
- Jetty will now start, and will be ready when you see on the output INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080 STARTING
- Point your browser to http://localhost:8080/index
If the default java runtime is not of a late enough version or is a jre and not a jdk then runServer.sh must be edited to state the full path of a jdk java executable.
Windows
- Edit runServer.bat changing the JDK_HOME to point to an installation of JDK 1.6 or later
- Open a command prompt
- Do runserver.bat
- Jetty will now start, and will be ready when you see on the output INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080 STARTING
- Point your browser to http://localhost:8080/index

Uploading to a server
- Zip up the uploadThis directory to an archive file (eg uploadThis.zip)
- Upload it to your server (this can be done with ftp or scp or sftp) to a location of your choosing
- Open a command line session on your server (eg PuTTY or SSH)
- Unzip the archive in its remote location - unzip uploadThis.zip
- Change directory to the now unarchived uploadThis directory
- Change the permission on the runServer.sh script (chmod +x runServer.sh)
- Run the script to start the server ./runServer.sh > output.log &
- Point your browser to the server (http://servername:8080/index)
Note: for Internet Explorer you must provide the http:// prefix
Stopping a remote server
The easiest way to stop a server is to enter
ps aux
In the resulting listing will be one line corresponding to the process for the server you wish to stop: eg
500 27452 0.0 5.9 681688 123168 ? Sl Mar07 0:18 /usr/java/jdk1.6.0_20/bin/java -server -jar jt.jar --port 8078 --path /index Index.war --path /diagrams Diagrams.war --
kill -9 27452
Running on a different port
The default port 8080 can be changed by editing the runServer script.
As the server starts confirm the port number INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8070 STARTING
Once the server is running, you will need to specify the new port number in the url as you access the content:

Using other webservers
For convenience, Jetty Runner jar is included in the batch result for ease of deployment. However, you do not have to use Jetty if, for example, you prefer a different application server which you already have installed. Alternatives to Jetty include:
- Tomcat
- Glassfish
- JBoss
- BEA