Dynamin Jfree chart in jsp---error

Dynamin Jfree chart in jsp---error

 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
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
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
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
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
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
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
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 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
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: class UserForm not found in class model.UserAction
JSP error: class UserForm not found in class model.UserAction  etting the following error in the program..wat shod i do to remove this?I am using jdeveloper 10 g [code] package model; import javax.servlet.http.HttpServletRequest
Artifacts of jfree
List of Artifacts of jfree maven depenency
Version of jfree>jcommon dependency
Version of jfree>jfreechart dependency
Version of jfree>jfreereport dependency
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
jfree missing import file
jfree missing import file  hi....... i have checked the jar file of jfree that import file of RECTANGLEINSETS is not there then what to do now? how to solve this problem? plz help?   Download jcommon-1.0.16.jar
jfree missing import file
jfree missing import file  hi....... i have checked the jar file of jfree that import file of RECTANGLEINSETS is not there then what to do now? how to solve this problem? plz help?   Download jcommon-1.0.16.jar
jfree missing import file
jfree missing import file  hi....... i have checked the jar file of jfree that import file of RECTANGLEINSETS is not there then what to do now? how to solve this problem? plz help?   Download jcommon-1.0.16.jar
jfree missing import file
jfree missing import file  hi....... i have checked the jar file of jfree that import file of RECTANGLEINSETS is not there then what to do now? how to solve this problem? plz help?   Download jcommon-1.0.16.jar
pie chart
pie chart  how to create pie chart using struts2
JFREE error again
JFREE error again  hi......... As i had asked u the jfree error i want to tel u that i have taken the both the jar files jfree and jcommon. but then also its giving me error i am able to compile the code but now when i am
Version of jfree>jfreechart-swt dependency
Version of jfree>jfreereport-ext dependency
Version of jfree>jfreechart-experimental dependency
Pie chart
Pie chart  hi................. In my project i want to create a pie-chart by taking values at run time. As want to display it in pie chart form....   Java Swing PIE Chart
bar chart
bar chart  how to create a bar chart from values of the database and the string value should be the entities of the database??plzz help..needed badly

Ads