Both applet and servlet may be set to acquire the configuration and graph
data from a server side process/script. This is done by simply entering the URL of the server side process into the parameters
of the bar graph. This method gives the bar graph enormous flexibility in terms of data acquisition and in the next section you
will see how to use this method to retrieve data from a database.
Creating the Server Side Process
The server side process can be created in any language of your choice and the only criteria is that the output must follow the
data naming convention described for the data files (see Retrieving Graph Data from files). To help
you create your own server side script we have created some template scripts in the "/TemplateScripts"
directory. We recommend using these scripts as a starting point for your own.
Configuring the Applet to use Server Side Scripts.
To set the applet to acquire data from a server process simply, add the following parameters to your html, between the <applet>
and </applet> tags.
replacing [URL of Server Process] with the URL of your server process.
For example if we have two java servlets (configServlet and DataServlet) which create the config properties and supply the graph
data at urls,
http://www.yourdomain.com/servlet/configServlet
http://www.yourdomain.com/servlet/DataServlet
then the html parameters would be,
For example server scripts (in ASP, PHP, JSP and Servlet) please see the
Script Interface section or click here.
Configuring the Servlet to use Server Side Scripts.
To set the servlet to acquire data from a server process, simply
insert the urls of the server processes into the <IMG> tag in your html page.
replacing [URLconfigfile] and [URLdataFile] with the urls of
your server processes. For example if we have two java servlets (configServlet and DataServlet) which create the config properties
and supply the graph data at urls,
http://www.yourdomain.com/servlet/configServlet
http://www.yourdomain.com/servlet/DataServlet
then the html <IMG> tag would be,
For example server scripts (in ASP, PHP, JSP and Servlet) please see the
Script Interface section or click here.
The Graphing Software provides several methods by which data can be acquired
from databases. For a full discussion on the various methods and Template Scripts please see the
Tutorial Section.
|