Mathematica Web Functions




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. webMathematica 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.

MSPBlocksecure scoping construct for HTTP input
MSPToExpressioninterpret input in a secure way
MSPValuereturn the value of an HTTP input variable
MSPValueQtest if an HTTP input variable has a value


webMathematica 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.

MSPFormatformat results into text or image formats
MSPShowformat graphics by creating an image
MSPLive3Dformat 3D graphics to allow interactive viewing
MSPGetMessagesdisplay any messages
MSPGetPrintOutputdisplay any print output
HTMLTableFormformat into an HTML table
HTMLSelectformat into an HTML select

Web Interaction

webMathematica 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.

MSPReturnhalt processing of the current page and return a different result
MSPSessionVariablescope a variable to an HTTP session
MSPGetUploadFileget the name of a file uploaded with the HTTP request
MSPURLStorestore a result on the server that can be retrieved with a URL