graph chart

2D / 3D Stacked Horizontal Bar Graph Examples

[ Bar Graph Home ] [ Tutorials ] [ Documentation ] [ Getting Started ] [ Solutions ]

Servlet - Printing Demo

If you do not see the graph image below then click here»

( for an interactive version of this page please click here )

This example demonstrates how to implement both the applet and servlet together so that all the interactive features of the applet are presented to the user and also giving the user the option of printing the page containing the graph.

On this page we implement the servlet ( which acquires both the configuration and graph data from data files). This page is almost identical and contains the servlet implementation which is universally printable.

The configuration data is acquired from the text file barprops.txt (click here to view)
and the graph data is acquired from the text file bardata.txt (click here to view).

and here is the HTML code,

<img src="http://localhost:8080/servlet/SHbarchartServlet?
config=http://www.jpowered.com/bar_graph/shbarchart/Examples/barprops.txt&
data=http://www.jpowered.com/bar_graph/shbarchart/Examples/bardata.txt"
width="450" height="440">

For a full explanation of and range of values for the above parameters please see the Documentation - Configuration Options».

« back to Examples Index

« back to Getting Started

[ Bar Graph Home ] [ Tutorials ] [ Documentation ] [ Getting Started ] [ Solutions ]

 

 

 

 

The servlet examples are designed to run on the local machine and require that Servletrunner ( part of the JSDK environment ) has already been installed. If you haven't already done so then you should implement the JSDK environment first, see http://java.sun.com/products/servlet/

(The graph servlet will of course work with all servlet engines. If you wish to view the examples with another servlet engine then you will need to adjust the example pages to point to your servlet engine ).

Once you have installed the JSDK environment please copy all the files in the ./Servlet/ directory to the JSDK servlet directory ( usually c:\JSDK2.0\examples\ ). Now start the ServletRunner and then click on the examples below.

 

 

 

 

Getting Started

Documentation

Examples

Tutorials

Common Problems
This section describes and provides solutions to common problems.