## web*Mathematica* Technology

web*Mathematica* is based on two standard Java technologies: Java Servlet and JavaServer Pages (JSPs). Servlets are special Java programs that run in a Java-enabled web server, which is typically called a "servlet container" (or sometimes a "servlet engine"). There are many different types of servlet containers that will run on many different operating systems and architectures. They can also be integrated into other web servers, such as the Apache web server.

web*Mathematica* allows a site to deliver HTML pages that are enhanced by the addition of *Mathematica* commands. When a request is made for one of these pages, the *Mathematica* commands are evaluated and the computed result is placed in the page. This is done with the standard Java templating mechanism, JavaServer Pages, making use of a special tags; examples of these are given in a later section.

web*Mathematica* technology uses the request/response standard followed by web servers. Input can come from HTML forms, applets, JavaScript, and web-enabled applications. It is also possible to send data files to a web*Mathematica* server for processing. Output can be many different formats such as HTML, images, *Mathematica* notebooks, MathML, SVG, XML, PostScript, and PDF. This user guide includes examples of working with all these different technologies.

web*Mathematica* provides a large library of *Mathematica* commands to handle the many possible ways of working with *Mathematica* computations. An important part of web*Mathematica* is the kernel manager that calls *Mathematica* in a robust, efficient, and secure manner. The manager maintains a pool of one or more *Mathematica* kernels and, in this way, can process more than one request at a time. An overview of the workings of a web*Mathematica* site is shown here.

1. Browser sends request to web*Mathematica* server.

2. web*Mathematica* server acquires *Mathematica* kernel from the pool.

3. *Mathematica* kernel is initialized with input parameters, carries out calculations, and returns result to server.

4. web*Mathematica* server returns *Mathematica* kernel to the pool.

5. web*Mathematica* server returns result to browser.

### Requirements

The aim of web*Mathematica* and MSP technology is to reduce the amount of extra knowledge required for developing a site to a minimum. In practice, this means knowing something about HTML and *Mathematica*. You do not need any special knowledge of Java, nor do you need to know anything about JavaScript. web*Mathematica* also aims to automate the management of the site to make running, maintenance, and configuration as convenient as possible. Administrators of web*Mathematica* sites do not need any knowledge of Java beyond its installation.

The minimum technical components for web*Mathematica* are:

1. A servlet container supporting both the Servlet Specification 2.4 (or higher) and JSP Specification 2.0 (or higher)

There are many different combinations of hardware and operating systems that support these components. Most systems that run *Mathematica* will support web*Mathematica*. At present Windows, Linux, and Mac OS X are fully supported, http://www.wolfram.com/mathematica/system-requirements.html. Setting up the servlet container is discussed in a later section.