Dynamin Jfree chart in jsp---error

Ads

 
 

Share on Google+Share on Google+

Praveen Chinthala
Dynamin Jfree chart in jsp---error
1 Answer(s)      5 years and 9 months ago
Posted in : Development process
 While compiling this CODE:  
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="org.jfree.chart.ChartFactory" %>
    <%@ page import="org.jfree.chart.ChartUtilities"%>
    <%@ page import="org.jfree.chart.JFreeChart" %>
    <%@ page import="org.jfree.chart.plot.PlotOrientation"%>
    <%@ page import="org.jfree.data.*" %>
    <%@ page import="org.jfree.data.jdbc.JDBCCategoryDataset"%>
    <%@ page import="org.jfree.chart.renderer.category.CategoryItemRenderer"%>
    <%@ page import="org.jfree.chart.plot.CategoryPlot"%>
    <%@ page import="org.jfree.chart.plot.PlotOrientation"%>
     <%@ page import="java.awt.Color"%>
    <%
    String query="SELECT * from Cricket";
    JDBCCategoryDataset dataset=new JDBCCategoryDataset("jdbc:mysql://localhost:3306/mysql",
    "com.mysql.jdbc.Driver","root","roohi");

    dataset.executeQuery( query);
    JFreeChart chart = ChartFactory .createBarChart3D(
    "Stock Update",
    "runs",
    "overs",
    dataset,
    PlotOrientation.VERTICAL,true, true, false);

    CategoryPlot plot = chart.getCategoryPlot();
    CategoryItemRenderer renderer = plot.getRenderer();

    renderer.setSeriesPaint(0, Color.green);
    try
    {
    ChartUtilities.saveChartAsJPEG(new File("c:\\chart.jpg"), chart, 500, 450);
    }
    catch (IOException e)
    {
    System.out.println("Problem in creating chart.");
    }
    %>


Generated error:
<identifier> expected
public class {

Please help out on this
Ads
View Answers

January 19, 2012 at 4:33 PM


Post error details.

Have a look at the following link:

http://www.roseindia.net/jsp/draw-statistical-chart-jsp.shtml


Ads









Related Tutorials/Questions & Answers:
Dynamin Jfree chart in jsp---error
Dynamin Jfree chart in jsp---error   While compiling this CODE...("Problem in creating chart."); } %> Generated error: <... error details. Have a look at the following link: http://www.roseindia.net/jsp
jfree chart
jfree chart  i need donut chart using jfree
Advertisements
JFree chart package error
JFree chart package error  hi, I had asked u abt the jfree chart package and done what u have said. Its working but its giving me error that some... the jcommon jar file and jfree jar file for the bar chart code. but now its giving
JFREE chart - Java Beginners
JFREE chart  how can i get the latest save image of my action class.....thanks,i want my chart to display dynamically from my database  Hi... database on your chart
Jfree chart problem - Swing AWT
Jfree chart problem  hello i have a problem related to jfree chart i have some data and i want to display data in two different chart stacked area chart and line chart both in a single frame. That is hybrid combination
Pie chart Jfree create error
Pie chart Jfree create error  hi........... thanks 4 ur help but when i am using the code which has a import file import org.jfree.chart.*; its giving me an error that " package org.jfree.chart does not exists " can u help me
hybrid graph (jfree chart) - Swing AWT
hybrid graph (jfree chart)  hello i have a problem related to jfree chart.I want to display hybrid graph (Stacked Area and Line ).combination of stacked area chart and Line chart in one frame. Plese anybody help me out
Create a Pie Chart in jsp Page using JFree Chart
Create a Pie Chart in jsp Page using JFree Chart  Hello Sir I followed ur tutorial on "CREATE A PIE CHART IN JSP PAGE USING JFREE CHART... the pie chart report and after that save it to the desired location.Kindly help me
JFree 3D Bar Chart not displaying in JSP - Java3D
JFree 3D Bar Chart not displaying in JSP  Hi I am trying to run JFree 3D bar chart written in your site under link: http://www.roseindia.net/chartgraphs/3Dbarchart-in-jsppage.shtml This is not working. PNG file
display combination of a stacked area chart and line chart in one iframe using jfree - JSP-Servlet
display combination of a stacked area chart and line chart in one iframe using jfree  hello i have a problem related to jfree chart, i want to display combination of a stacked area chart and line chart in one iframe
Jfree exception
Jfree exception  import java.sql.*; import org.jfree.chart.... org.jfree.data.xy.*; import org.jfree.data.*; public class Chart{ public static... = new XYSeriesCollection(series); JFreeChart chart
Jfree exception
Jfree exception  import java.sql.*; import org.jfree.chart.... org.jfree.data.xy.*; import org.jfree.data.*; public class Chart{ public static... = new XYSeriesCollection(series); JFreeChart chart
JFREE error
JFREE error   hi......... the code for making chart is: WHICH IS GIVING THE ERROR import org.jfree.chart.*; import org.jfree.data.category...."); JFreeChart chart = ChartFactory.createBarChart ("BarChart using JFreeChart
chart tutorial - Java3D
chart tutorial  Hi I need a JFree Chart class library in order to design a chart with java  Hi friend, For JFree Chart class library... information,Tutorials and Examples on JFree Chart visit to : http://www.roseindia.net
jfree - Java Beginners
(300,300); } } For more information,Examples and Tutorials on jfree chart...jfree  how use the "import jfree" on jdk1.5.0_6,,? or how to plot... xyDataset = new XYSeriesCollection(series); JFreeChart chart
JSP Error Page
JSP Error Page          JSP Error Page is used to specify the custom... directive. The page errorPage.jsp shows the error generated in calling the JSP page
Artifacts of jfree
List of Artifacts of jfree maven depenency
Jfree - Java Beginners
on jfree chart visit to : http://www.roseindia.net/chartgraphs/ Thanks...(20)); pieDataset.setValue("Six", new Integer(10)); JFreeChart chart = ChartFactory.createPieChart ("Pie Chart using JFreeChart", pieDataset, true,true
JSP error page - JSP-Servlet
JSP error page  Hi i have 1000 of JSP. but we coded it without adding... the exception occured in JSP. is there any short cut i can do? do not want to add this line.../DAO/bean layer and not in the JSP. let me know if you have any idea. Thanks
JSP Error 500
JSP Error 500          JSP Error 500 is to generate error status 500 in jsp.  The Error 500 occurred when the server encounter an internal error
hybrid chart(Stacked Area and Line ) - Swing AWT
hybrid chart(Stacked Area and Line )  hello i have a problem related to jfree chart i have some data and i want to display data in two different chart stacked area chart and line chart both in a single frame
Bar Chart in JSP - JSP-Servlet
Bar Chart in JSP  Hi I am creating Bar chart using Jfree charts in JSP. Please advise me how to customize it. Like controlling the colors, width for each bar, showing values above the bar .  hi friend, Use
i want to show timeline chart for three year in chart..
i want to show timeline chart for three year in chart..  I am using Jfree chart library to display chart in web pages. i want to show three year data in chart in 3 lines for three year in same chart. i am able to show
JFree - Java Beginners
JFree  how to import JFree to jdk1.6.0_05, not to new version,, or how to get java new version (that used JFree ) ? regads  Hi friend, For solving the problem visit to : http://www.roseindia.net/chartgraphs
Jsp error when i run this a jsp file
Jsp error when i run this a jsp file  hi I got this error when i run the jsp file in IDE and outside also please help me java.lang.NullPointerException org.apache.jsp.insertjsp.jspInit(insert_jsp.java:22
jsp error
jsp error  <p>hi, could please help whenever i run jsp file in my eclipse i got this error.my jsp file is</p> &lt;%@ page language... encountered an internal error () that prevented it from fulfilling this request
JSP error
JSP error  what is difference between global-exception and error-page in jsp. which condition they are use
jfree - Java Beginners
jfree  how use the "import jfree" on jdk1.5.0_6,, or how to plot data in xy line on jdk1.5.0_6

Ads

 
Advertisement null

Ads