<%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <%! ResultSet rs = null; int cnt=0;%> <% final String URL = "jdbc:HypersonicSQL:defaultdb"; final String DRIVER = "org.hsql.jdbcDriver"; final String USERNAME = "sa"; final String PASSWORD = ""; Connection con = null; String sql = "select eid,mid,first_name,last_name,title from orgtable"; String results = ""; String errMsg = null; //load driver try{ Class.forName(DRIVER); con = DriverManager.getConnection(URL, USERNAME, PASSWORD); if(sql!=null){ Statement stmt = con.createStatement(); if(stmt.execute(sql)){ rs = stmt.getResultSet(); } else { errMsg = "Query successful"; } } } catch(SQLException e){ errMsg = e.getMessage(); } %>

orgchartGenerator9


Here is a demo of the applet where the chart data is generated dynamically from the server. This example illustrates the use of a new param SQL_OUTPUT_DATA. The value of this param is set to "yes". The JSP code used for this example is given here. The data is extracted from a hsql database table called orgtable with the following data:(Please note that the top box displays author info in this demo version)
eid
mid
lname
fname
title
1 0 'Senthilnathan' 'Nalla' 'President and CEO'
2 1 'Morocco' 'Doug' 'Sales asia Pacifc'
3 1 'Mandarin' 'Tom' 'sales Americas'
4 1 'Bucharest' 'Mike' 'Sales australia'
5 2 'Last52' 'First52' 'Title52'
6 2 'Last62' 'First62' 'Title62'
7 4 'Last74' 'First74' 'Title74'
To handle a bug in IE3.0

<%;}else{%><%=";"%><%;}%><%}%>0;0;ffcc66;<%out.println("emp"+cnt+".html|");%> <%}%> ">
To handle a bug in IE3.0


Nalla Senthilnathan