﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionCharts Free / FusionCharts Free and JSP   / JSP and CreateChart method / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>FusionCharts Forum</description><link>http://www.fusioncharts.com/forum/</link><webMaster>support@fusioncharts.com</webMaster><lastBuildDate>Mon, 08 Sep 2008 07:11:17 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: JSP and CreateChart method</title><link>http://www.fusioncharts.com/forum/Topic5677-45-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;Could you please download the eval version of FusionCharts v3 in which you would get the file needed. &lt;/P&gt;&lt;P&gt;Moreover, please note that you are using the XML for FusionCharts v3 and not for FusionCharts FREE. Please change the &amp;lt;chart&amp;gt;/&amp;lt;/chart&amp;gt; to &amp;lt;graph&amp;gt; &amp;lt;/graph&amp;gt; and 'label' to 'name' so that the XML works for FREE charts.&lt;/P&gt;&lt;P&gt;Please visit documentation for FREE in &lt;A href="http://www.fusioncharts.com/free/docs"&gt;www.fusioncharts.com/free/docs&lt;/A&gt; for more on the XML structure of FREE charts.</description><pubDate>Thu, 17 Apr 2008 08:56:47 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>RE: JSP and CreateChart method</title><link>http://www.fusioncharts.com/forum/Topic5677-45-1.aspx</link><description>Hi Sudipto,&lt;/P&gt;&lt;P&gt;Where is this FusionCharts.jsp ? I am not able to find it in the zip file i downloaded for fusion charts free.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sachin</description><pubDate>Thu, 17 Apr 2008 00:54:46 GMT</pubDate><dc:creator>Abhi</dc:creator></item><item><title>RE: JSP and CreateChart method</title><link>http://www.fusioncharts.com/forum/Topic5677-45-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;Could you please try including the FusionCharts.jsp in your application?&lt;/P&gt;&lt;P&gt;e.g. &amp;lt;%@ include file="Includes/FusionCharts.jsp"%&amp;gt;&lt;BR&gt;</description><pubDate>Wed, 16 Apr 2008 08:38:52 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>JSP and CreateChart method</title><link>http://www.fusioncharts.com/forum/Topic5677-45-1.aspx</link><description>Hello,&lt;/P&gt;&lt;P&gt;I am trying to use Fusion Free Charts with jsp. When i run my code below from browser i am getting the following error as its asking for CreateChart method -&lt;/P&gt;&lt;P&gt;Pls help resolve this error. What is there create chart method and how can i find it ?&lt;/P&gt;&lt;P&gt;ERROR :&lt;/P&gt;&lt;P&gt;************************************************************&lt;/P&gt;&lt;P&gt;An error occurred at line: 87 in the jsp file: /FusionCharts/MyChart/fusion.jsp&lt;BR&gt;The method createChart(String, String, String, String, int, int, boolean, boolean) is undefined for the type fusion_jsp&lt;BR&gt;84:            }&lt;BR&gt;&lt;/P&gt;&lt;P&gt;************************************************************&lt;/P&gt;&lt;P&gt;Code is below&lt;/P&gt;&lt;P&gt;************************************************************&lt;/P&gt;&lt;P&gt;&amp;lt;jsp:useBean id="dbconn" class = "dbcon.ConnectionUtil"  scope="page"/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;%@ page import="java.sql.Statement"%&amp;gt;&lt;BR&gt;&amp;lt;%@ page import="java.sql.*"%&amp;gt;&lt;BR&gt;&amp;lt;%@ page import="java.sql.ResultSet"%&amp;gt;&lt;BR&gt;&amp;lt;%@ page import="java.sql.Date"%&amp;gt;&lt;BR&gt;&amp;lt;HTML&amp;gt;&lt;BR&gt;   &amp;lt;HEAD&amp;gt;&lt;BR&gt;       &amp;lt;TITLE&amp;gt;FusionCharts - Database Example&amp;lt;/TITLE&amp;gt;&lt;BR&gt;       &amp;lt;SCRIPT LANGUAGE="Javascript" SRC="FusionCharts.js"&amp;gt;&amp;lt;/SCRIPT&amp;gt;&lt;BR&gt;   &amp;lt;/HEAD&amp;gt;&lt;BR&gt;   &amp;lt;BODY&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR&gt;   &amp;lt;%&lt;BR&gt;       /*&lt;BR&gt;       In this example, we show how to connect FusionCharts to a database.&lt;BR&gt;       For the sake of ease, we've used a database which contains two tables,&lt;BR&gt;       which are linked to each  other.&lt;BR&gt;       */&lt;BR&gt;       Connection conn;&lt;BR&gt;       conn = dbconn.getConnection();&lt;BR&gt;       //Database Objects - Initialization&lt;BR&gt;       Statement st1,st2;&lt;BR&gt;       ResultSet rs1,rs2;&lt;/P&gt;&lt;P&gt;       String strQuery="";&lt;/P&gt;&lt;P&gt;       //strXML will be used to store the entire XML document generated&lt;BR&gt;       String strXML="";&lt;/P&gt;&lt;P&gt;&lt;BR&gt;       //Generate the chart element&lt;BR&gt;       strXML = "&amp;lt;chart caption='Factory Output report' subCaption='By Quantity pieSliceDepth='30' showBorder='1' formatNumberScale='0' numberSuffix='Units'&amp;gt;";&lt;/P&gt;&lt;P&gt;       //Construct the query to retrieve data&lt;BR&gt;       strQuery = "select * from sarlogs";&lt;/P&gt;&lt;P&gt;&lt;BR&gt;       st1=conn.createStatement();&lt;BR&gt;       rs1=st1.executeQuery(strQuery);&lt;BR&gt;       String factoryvalue= null;&lt;BR&gt;       String factoryId=null;&lt;BR&gt;       String factoryName=null;&lt;BR&gt;       String totalOutput="";&lt;BR&gt;       //Iterate through each factory&lt;BR&gt;       while(rs1.next()) {&lt;/P&gt;&lt;P&gt;           factoryId=rs1.getString("timestamp");&lt;BR&gt;           factoryvalue=rs1.getString("value");&lt;BR&gt;           factoryName="SERVER1";&lt;BR&gt;           //Now create second recordset to get details for this factory&lt;BR&gt;           //Generate &amp;lt;set label='..' value='..'/&amp;gt;&lt;BR&gt;           strXML += "&amp;lt;set label='" + factoryName + "' value='" +factoryvalue+ "'/&amp;gt;";&lt;BR&gt;           //Close resultset&lt;BR&gt;       } //end of while&lt;BR&gt;       //Finally, close &amp;lt;chart&amp;gt; element&lt;BR&gt;       strXML += "&amp;lt;/chart&amp;gt;";&lt;BR&gt;       //close the resulset,statement,connection&lt;BR&gt;       try {&lt;BR&gt;           if(null!=rs1){&lt;BR&gt;               rs1.close();&lt;BR&gt;               rs1=null;&lt;BR&gt;           }&lt;BR&gt;       }catch(java.sql.SQLException e){&lt;BR&gt;            System.out.println("Could not close the resultset");&lt;BR&gt;       }&lt;BR&gt;       try {&lt;BR&gt;           if(null!=st1) {&lt;BR&gt;               st1.close();&lt;BR&gt;               st1=null;&lt;BR&gt;           }&lt;BR&gt;           }catch(java.sql.SQLException e){&lt;BR&gt;            System.out.println("Could not close the statement");&lt;BR&gt;           }&lt;BR&gt;       try {&lt;BR&gt;           if(null!=conn) {&lt;BR&gt;               conn.close();&lt;BR&gt;               conn=null;&lt;BR&gt;           }&lt;BR&gt;           }catch(java.sql.SQLException e){&lt;BR&gt;            System.out.println("Could not close the connection");&lt;BR&gt;           }&lt;/P&gt;&lt;P&gt;       //Create the chart - Pie 3D Chart with data from strXML&lt;BR&gt;       String chartCode=createChart("../../FusionCharts/line.swf", "", strXML,&lt;BR&gt;       "FactorySum", 600, 300, false, false);&lt;/P&gt;&lt;P&gt;   %&amp;gt;&lt;BR&gt;   &amp;lt;%=chartCode%&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;/BODY&amp;gt;&lt;BR&gt;&amp;lt;/HTML&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR&gt;************************************************************</description><pubDate>Wed, 16 Apr 2008 01:57:31 GMT</pubDate><dc:creator>Abhi</dc:creator></item></channel></rss>