webMathematica >

Installing the webMathematica Web Application

Tomcat

Second, configure the file MSPConfiguration.xml, located in the WEB-INF/conf directory. This file holds various site-specific parameters and may need modification for your site. The settings that can be placed into MSPConfiguration.xml are described in the section Site Configuration.
The most important setting is KernelExecutable, the location of the Mathematica kernel. The MSPConfiguration.xml that ships with webMathematica contains settings suitable for a default installation of Mathematica for Windows, Unix, Linux, and Mac OS X. However, if you install Mathematica into a nondefault location, you will need to modify this file. For example, if you installed Mathematica into E:\Mathematica, make the following setting of KernelExecutable in MSPConfiguration.xml.
<KernelExecutable>
E:\Mathematica\MathKernel.exe
</KernelExecutable>
Another reason to modify MSPConfiguration.xml is to store your webMathematica license in its own password file, for example, webMathematica/WEB-INF/conf/mathpass. It would then be necessary to modify KernelLaunchFlags in MSPConfiguration.xml to ensure that Mathematica uses this location. The following shows how this could be done for a typical Windows installation.
<KernelLaunchFlags>
-pwfile c:/Program Files/tomcat/webapps/webMathematica/WEB-INF/conf/mathpass
</KernelLaunchFlags>
A typical setting for MSPConfiguration.xml to use a special mathpass file under Unix is shown below.
<KernelLaunchFlags>
-pwfile /usr/local/tomcat/webapps/webMathematica/WEF-INF/conf/mathpass
</KernelLaunchFlags>
Under Unix, you may need to add a FrontEndLaunchFlags parameter so the front end can run properly. In the following example, the front end will be launched to use DISPLAY 1 with fixed geometry and in server mode. For more information on running the front end under Unix, see the documentation section Configuring for the X Window System.
<FrontEndLaunchFlags>
-display :1 -nogui -geometry 1000x500+10+10
</FrontEndLaunchFlags>

Other Servlet Engines