The output of an msp:evaluate tag is inserted into the page that is returned as part of the web request. This section will describe the different types of formatting output. This topic is related to the placement of Mathematica commands into webMathematica pages and more information is found in the Appendix: <msp:evaluate>.
Any result that is computed by an msp:evaluate tag that is not a string will be formatted into a string which will use the necessary HTML escapes. An example is shown below.
<msp:evaluate> Range </msp:evaluate>
This type of formatting is equivalent to MSPFormat with a format type of OutputForm. The reference section has more information on MSPFormat.
Different styles of formatting output can be generated with MSPFormat. The example below uses MSPFormat with a format type of TraditionalForm.
The reference section has more information on MSPShow.
Sometimes you want to use the msp:evaluate tag to evaluate something, but you do not want to leave anything in the resulting page. This can be done by adding a semi-colon ';' after the computation as shown below.
Adding a semi-colon causes the Mathematica symbol Null to be returned, and this is formatted to leave no trace in the output.
Output is suppressed whatever the computation, whether it uses one of the formatting functions, a graphics function, or a function that returns Print or Message output. In the following example, no output will be seen from the message output function because it is followed by a semi-colon.
<msp:evaluate> MSPGetMessages; </msp:evaluate>
If you wish to calculate more than one result in an msp:evaluate tag the different steps must be separated with a semi-colon ';'. The result of the last computation will be formatted and appear in the output page. In the example below, the numerical result of x+y computation will appear.
<msp:evaluate> x = Sin[5.6]; y = Sqrt[x]; x+y </msp:evaluate>
If you wish to suppress the result of the last computation you can use a semi-colon ';' as described in the section on Suppressing Output.