|
[Date Index]
[Thread Index]
[Author Index]
Re: webMathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg31532] Re: webMathematica
- From: bghiggins at ucdavis.edu (Brian Higgins)
- Date: Fri, 9 Nov 2001 06:13:39 -0500 (EST)
- Approved: Steven M. Christensen <steve@smc.vnet.net>, Moderator
- Organization: http://groups.google.com/
- References: <9qjjnd$j8a$1@smc.vnet.net> <9qrcm7$bvn$1@smc.vnet.net> <9sdkp4$5vh$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Ulrich, Here is an example of a JSP page calling webMathematica and
displaying a plot in the JSP page:
http://169.237.64.144:8080/webMathematica/JSP_Plot.jsp
The code for the JSP_Plot.jsp page:
<%@page language="java"
import="java.lang.*" %>
<HTML>
<HEAD>
<TITLE>JSP Plot</TITLE>
</HEAD>
<BODY BGCOLOR="white">
<H1>Mathematica Plot Displayed in a JSP page</H1>
<p>
The following plot is generated by webMathematica and then displayed
in a JSP page.
<% String
msp="/MSP?$ScriptName=Examples/JSPPlot&fun=Sin[x]&x1=2Pi&size=200";
%>
<jsp:include page="<%= msp%>" flush="true" />
</BODY>
</HTML>
The code for the MSP page JSPPlot.msp is
<%Mathlet
MSPBlock[ {$$fun, $$x1,$$size},
MSPShow[ Plot[$$fun, {x,0,$$x1},ImageSize->$$size]]] %>
This example is based on a similar example given in the webMathematica
documentation. Note you can readily modify the jsp page so that it has
a form to allow a user to input the size of the plot.
Trust this helps,
Cheers,
Brian
Ulrich Hofstoetter <ulrich.hofstoetter at visualanalysis.com> wrote in message news:<9sdkp4$5vh$1 at smc.vnet.net>...
> Brian Higgins wrote:
> >
> > I am not sure if you mean MSP as a apposed to a JSP page.
> > webMathematica returns a MSP page though one can integrate a MSP
> > within a JSP.
> >
> > Here is a msp page that does the require task
> >
> > <html >
> > <head>
> >
> > <title>Plot Test</title>
> >
> > </head>
> > <body> <h2>Plot size</h2>
> >
> > <%Mathlet MSPShow[Plot[Sin[x],{x,0,5}, ImageSize->300]]%>
> >
> > <p></p>
> >
> > <%Mathlet MSPShow[Plot[Sin[x],{x,0,5}, ImageSize->100]]%>
> >
> > </body>
> > </html>
> >
>
> I fail to find the JSP part in this page.
>
> Yours Ulrich
> --
> Dipl.-Inf. Ulrich Hofstötter
> Visual Analysis AG
> Neumarkter Str. 87
> D - 81673 München
>
> Tel: (+49)89-431981-38
> Fax: (+49)89-431981-1
> e-mail: ulrich.hofstoetter at visualanalysis.com
> www: http://www.visualanalysis.com
Prev by Date:
List Manipulation
Next by Date:
Re: Complex Number Simultaneous Equation 2 Unknowns
Previous by thread:
Re: webMathematica
Next by thread:
Re: webMathematica
|