11.07.2015 Views

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

webMathematica User Guide 287Processing a JSPThis section will describe the different stages that are involved in processing a JSP forwebMathematica.A JSP is processed as part of an HTTP transaction. A client sends a request to the server, whichreplies with a response. One feature of HTTP requests is that they can send parameters andvalues to the server. This is essential for any dynamic behavior, because parameters are usedto select and control the response. The response could be an HTML page. However, it could besome other content type, such as an image, a Mathematica notebook, or some form of XML.The JSP is processed by the servlet container in which it is running, it is processed in a topdownmethod, so that commands at the top are evaluated before commands lower down. A JSPinteracts with webMathematica by means of the custom tags defined in the webMathematicatags. A sample page is shown below.pageeval1eval2The first evaluate tag allocates a Mathematica kernel to use for computations, assigning inputvariables and parameters, and other initialization. Note that the kernel that was allocated willbe available in a clean state.The evaluate tags then use the allocated Mathematica kernel to evaluate their input. Note thatany assignments or definitions made in one evaluate tag will be visible in another.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!