Mathematica Web Functions
web
Mathematica contains a large number of
Mathematica commands that can be used inside the
webMathematica tags that provide useful functionality for creating web material with
Mathematica. These are useful in various ways such as processing request parameters that are the input from a web user, formatting results, and using web features such as uploading files and HTTP sessions.
Typically, these commands are used inside of an
evaluate tag; more information on these tags is found in the
webMathematica tags section. An example, which calculates an integral and uses the function
MSPFormat to format the result into
TraditionalForm, is shown below.
<msp:evaluate>
MSPFormat[ Integrate[ expr, {var, 0, Infinity}], TraditionalForm]
<msp:evaluate>
The different functions are shown in the following sections.
Processing Input
HTTP input variables are a key way to control the operation of a dynamic website. These are typically embedded in your input page with <input> tags. web
Mathematica provides a number of functions for working with and processing input. This needs to be done carefully to avoid any security problems. The functions are summarized in the following table.
Formatting
web
Mathematica provides a number of important ways to format output for finished web pages. These include formatting into text, HTML, GIF, XML, MathML, and other formats. These are summarized in the following table.
Web Interaction
web
Mathematica provides a number of key functions for working with web features such as HTTP sessions and file upload. These are summarized in the following table.
MSPReturn | halt processing of the current page and return a different result |
MSPSessionVariable | scope a variable to an HTTP session |
MSPGetUploadFile | get the name of a file uploaded with the HTTP request |
MSPURLStore | store a result on the server that can be retrieved with a URL |