WEBMATHEMATICA TUTORIAL

Initial Checks

If you try to use a browser to connect to a webMathematica server and it does not operate in the expected way, try the following steps.

Check the Server

Make absolutely certain that your servlet container is working correctly. If you cannot connect to the demonstration examples that come with your container, then webMathematica is unlikely to work. Furthermore, Wolfram Research will not be able to give more than minimal assistance until your servlet container is working.

Check the URL

If your servlet container works but webMathematica does not, make sure you are using a correct URL. These are case sensitive, so make sure you use capital letters in the same places as the documentation describes. For example, http://localhost:8080/webMathematica/Examples/Hello.jsp is the appropriate usage. Make sure that this URL is consistent with the way you connect to your servlet container. If you need to specify a port number for your servlet container, you will need to use this for webMathematica. For example, the default settings for direct access for Tomcat is port 8080. A URL for a different servlet container might be different. The URLs in this document are all specified for Tomcat.

If you do not specify the URL correctly, you may see a Not Found (404) error in your browser.

Check the Initial Page

If the initial page that is returned to your browser in response to a webMathematica URL, such as http://localhost:8080/webMathematica/Examples/Hello.jsp, contains some other indication of an error, study it carefully. Some typical problems include configuration errors, such as failure to locate a configuration file or failure to launch Mathematica. Studying the initial page and rereading the installation instructions or looking at the specific problems listed later in this section may help to resolve the problem.

If no initial page is returned, your server is not operating. As noted above, if your server does not work, webMathematica cannot work.

If the initial page does not help resolve your problem, please save the page. It may be useful at some later stage.

Check the Kernel Monitor

The kernel monitor contains information on the configuration of the webMathematica site and also can print out information if your server is misconfigured. You should be able to find the monitor via http://localhost:8080/webMathematica/Resources/Tools/KernelMonitor.jsp. (You may have some different URL for accessing your server.) The monitor is described in more detail in a previous section.

Check the Logging System

The logging system is a good place to start to search for information on problems.

Check the Console Shell

Some servlet containers are launched from a command line in a console shell, and this may contain relevant information on any problems.

Check Mathematica

Run Mathematica in the same way that it is run from the servlet container. For example, under Unix, the servlet container often runs as tomcat, so this should be used to run Mathematica. Do this for both the Mathematica kernel and front end.

Under Unix, a typical command to run the Mathematica kernel as tomcat is as follows.

[user> su -c 'su tomcat -c math'

Here is a typical command to run the Mathematica front end as tomcat.

[user> su -c 'su tomcat -c mathematica'

Under Windows, it is possible to run the Mathematica kernel and front end from the Start menu.

Running Mathematica like this will help to identify problems that may prevent the web system from launching Mathematica. One source of problems is caused by a failure to find a license to run Mathematica. You can resolve this by making sure that the valid Mathematica license is present in the Mathematica layout, probably by placing a mathpass file into $InstallationDirectory/Configuration/Licensing.