Installing Tomcat

The standard distribution of VRSpace uses the web server within Tomcat to serve the client web application. Therefore, this note expects that the reader already has Tomcat installed. For detailed download and installation instructions, see the Getting Started tutorial.

For most uses of VRSpace, it is fine to start the two servers seperately. By doing this though, the Tomcat Servlet Engine and the VRSpace server are unable to communicate with each other. The following instructions will set up VRSpace to start Tomcat itself, and by doing so, create a communication pathway. To repeat again, after doing the following, you will no longer start or stop Tomcat, VRSpace will do it for you.

We will have to edit the database to do this. The file vrspace.db.tomcat, contained in vrspace\bin, lists templates for the lines that will be added:

The above lines must be modified for your particular database. The Tomcat installDir field is the installation directory of Tomcat. If you have Tomcat installed in a different directory than the standard location, c:\vrspace\tomcat, you will have to change this value. Also, even after running the server for the first time, a Transform 1 object has already been added to database (e.g. for the location of the Administrator). You will have to identify a free Transform id number and replace the Transform "1"s with that number.

The Tomcat distribution also needs to be fixed slightly so that Tomcat can be started by the VRSpace server. Go to c:\vrspace\tomcat\bin and copy bootstrap.jar to c:\vrspace\tomcat\common\lib.

That's all there is to it. A couple final notes about the properties above. The shutdown property specifies that Tomcat will not shutdown when there are no users logged in to the server. Every VRObject that has a url field has the ability to be displayed in your world. This means that you can specify a .wrl file to represent Tomcat, and it will be located at the position of the Transform. Most likely though, you don't wish to see Tomcat. This is why the url above has been set to a non-existent vrml file. The client will not be able to download the file, and hence, give up on displaying it.