NetCharts® Server: Java Toolkit getTable Example
This example shows how to utilize the NetCharts Server Java Toolkit to add an interactive table to a web page. The example uses the netcharts.server.api.NSToolkit class to add an HTML table produced by NetCharts Server onto the page. See the Source Code.
Note: This is a static image only - no interactivity.

Source Code
<%@ page import="netcharts.server.api.NSToolKit" %>
<%@ page import="java.util.Hashtable" %><html>
<head>
<title>NetCharts Server Java Toolkit Example - getTable</title>
</head>
<body>
<p>Create an instance of the <i>NSToolKit</i> class.</p>
<%
NSToolKit toolKit = new NSToolKit("localhost", 8001, "Examples/Suppliers");
// If the JSP page is running with NetCharts Server, use this constructor instead.
// NSToolKit toolKit = new NSToolKit("Examples/Suppliers");// Create the Hashtable to hold the chart request variables.
// (NOTE: If the Hashtable == null, type=PNG is the default)
Hashtable variables = new Hashtable();
variables.put("tableResolveStyles","true");
%><p>The function <i>getTable</i> is used to retrieve the table
and add it to the page.</p>
<%=toolKit.getTable("SupplierByFacility.tbl", variables)%></body>
</html>
![]()



