Re: webmathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg65091] Re: [mg64997] webmathematica
- From: Chris Williamson <chrisw at wolfram.com>
- Date: Tue, 14 Mar 2006 06:00:10 -0500 (EST)
- References: <200603111015.FAA15893@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In Mathematica if a is a Mathematica variable, you can do something like...
<msp:evaluate>
If[a === 1,
MSPFormat[ MSPToExpression[ToString[a-b]], TraditionalForm, "JPEG"],
MSPFormat[ MSPToExpression[ToString[a+b]], TraditionalForm, "JPEG"]
]
</msp:evaluate>
In Java if a is a Java variable, you can do something like...
<%
if (a == 1) {
%>
<msp:evaluate>
MSPFormat[ MSPToExpression[ToString[a-b]], TraditionalForm, "JPEG"]
</msp:evaluate><br>
<%
} else {
%>
<msp:evaluate>
MSPFormat[ MSPToExpression[ToString[a+b]], TraditionalForm, "JPEG"]
</msp:evaluate>
<%
}
%>
There are also if tags that are much cleaner than the Java syntax, that
are available from jakarta.apache.org, in the Standard Taglib.
Chris
liv elena wrote:
> hello,
>
> i ask you very much to help me with a problem.
> i want to write "if/then/else" instruction
> in jsp code like next example:
>
> if (a==1)
> then
> {
> <msp:evaluate>
> MSPFormat[ MSPToExpression[ToString[a-b]], TraditionalForm, "JPEG"]
> </msp:evaluate><br>
>
> <msp:evaluate>
> MSPFormat[ MSPToExpression[ToString[a+b]], TraditionalForm, "JPEG"]
> </msp:evaluate>
> }
>
> else
> {
> ...................
> ...................
> }
>
> i use jsp files for webmathematica server.
> thank you very much
>
>
>
>
>
>
- References:
- webmathematica
- From: liv elena <llivvia2003@yahoo.com>
- webmathematica