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.
7.1.1 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.
7.1.2 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 and JRun are ports 8080 and 8100 respectively. A URL for JRun is thus http://localhost:8100/webMathematica/Examples/Hello.jsp. 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.
7.1.3 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.
7.1.4 Check the KernelMonitor
The KernelMonitor 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/KernelMonitor. (You may have some different URL for accessing your server.) The monitor is described in more detail in a previous section.
7.1.5 Check the Log File
The log file is a good place to start to search for information on problems. This is a file to which the servlet container will write log information generated by webMathematica. Under Tomcat, a typical location for the log file is in the <tomcat-dir>/logs directory. Under JRun, it is <jrun-dir>/logs/default-event.log. For other servlet containers, you will need to study the relevant documentation. An empty log file may indicate that the user running the servlet container does not have permission to write to the log file directory. The Unix command tail -f can be useful for monitoring output from this file.
The volume of output is increased if the VerboseLogs property in the MSP.conf file is set to true. When VerboseLogs is false, only serious error situations will be reported. Studying the output logs is a good way to uncover problems.
If the log file does not help to resolve your problem, please save it. It may be useful at some later stage.
7.1.6 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.
7.1.7 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 $TopDirectory/Configuration/Licensing. The Getting Started with Mathematica manual has more information on license problems.