59
4. Developing Your Own Pages
Once  you  have  installed  and  configured  a  webMathematica  server  so  that  the  examples  run  correctly  and  have
studied the basics of writing material for webMathematica, as described 
previously
, you are ready to start develop 
ing your own material.
One  way  to  start  is  to  make  your  own  area  in  the  webMathematica  web  application.  You  could  make  a  directory
here  (for  example  NewScripts)  and  copy  one  of  the  samples  (for  example  Plot.jsp)  from  the  Examples
directory.  You  could then  access this  script  with the  URL http://localhost:8080/webMathematica/ 
NewScripts/Plot.jsp.
This  might  be  a  good  time  to  revisit  the  webMathematica  index  page  found  at  http://localhost:8080/web 
Mathematica/index.html,  which  provides  a  number  of  links  that  demonstrate  features  of  webMathematica.  When
you actually want to write your own material  you may look at the 
Tips and Tricks
 described in this chapter. The
chapter continues to describe other page development utilities that are part of webMathematica.
4.1 Tips and Tricks
This section provides a summary of a few issues that will help you to get started writing your own pages. These are
all described in more detail in later sections of the User Guide, but are collected together here in a brief description.
Getting a good grasp of these points will help you to make progress in developing your site.
4.1.1 Variables
There are two types of variable that are important to understand when you are getting started with webMathematica:
input variables and page variables.
Input variables  come with the HTTP request, for example from an input field in an HTML form. You can identify
input  variables  in  Mathematica  code  because  they  are  labelled  with  a   $$   prefix.  In  the  example  below  the  set 
ting variable may be set by an input field. In Mathematica code it is called $$setting.
If[ MSPValueQ[ $$setting], 
....
]
You  should  be  aware  that  input  variables  are  a  potential  security  risk  to  your  server  and  should  always  use  the
special functions, MSPBlock and MSPToExpression, for converting  into Mathematica input. In particular, you
should never use ToExpression on an input variable. An example of using MSPBlock is shown below.
 .
<





New Page 1








Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

 

Our web partners:  Jsp Web Hosting  Unlimited Web Hosting  Cheapest Web Hosting  Java Web Hosting  Web Templates  Best Web Templates  Web Design Templates  Interland Web Hosting  Cheap Web Hosting  Filemaker Web Hosting  Tomcat Web Hosting  Quality Web Hosting  Best Web Hosting  Mac Web Hosting

 
 

Virtualwebstudio. Business web hosting division of Vision Web Hosting Inc. All rights reserved

Comcast Web Hosting