This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hi Friends I am trying to compile following code for genrate a Chart in JSP.
Code
=====
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 23 in the jsp file: /TestChart.jsp
CategoryDataset cannot be resolved to a type
20: {200, 304, 201, 201, 340}
21: };
22:
23: final CategoryDataset dataset =
24: DatasetUtilities.createCategoryDataset(
25: "Team ", "", data);
26:
An error occurred at line: 24 in the jsp file: /TestChart.jsp
DatasetUtilities cannot be resolved
21: };
22:
23: final CategoryDataset dataset =
24: DatasetUtilities.createCategoryDataset(
25: "Team ", "", data);
26:
27: final JFreeChart chart = ChartFactory.createAreaChart(
An error occurred at line: 27 in the jsp file: /TestChart.jsp
JFreeChart cannot be resolved to a type
24: DatasetUtilities.createCategoryDataset(
25: "Team ", "", data);
26:
27: final JFreeChart chart = ChartFactory.createAreaChart(
28: "Area Chart", "", "Value", dataset,
29: PlotOrientation.VERTICAL,
30: true, true, false);
An error occurred at line: 27 in the jsp file: /TestChart.jsp
ChartFactory cannot be resolved
24: DatasetUtilities.createCategoryDataset(
25: "Team ", "", data);
26:
27: final JFreeChart chart = ChartFactory.createAreaChart(
28: "Area Chart", "", "Value", dataset,
29: PlotOrientation.VERTICAL,
30: true, true, false);
An error occurred at line: 29 in the jsp file: /TestChart.jsp
PlotOrientation.VERTICAL cannot be resolved to a type
26:
27: final JFreeChart chart = ChartFactory.createAreaChart(
28: "Area Chart", "", "Value", dataset,
29: PlotOrientation.VERTICAL,
30: true, true, false);
31:
32: final CategoryPlot plot = chart.getCategoryPlot();
An error occurred at line: 32 in the jsp file: /TestChart.jsp
CategoryPlot cannot be resolved to a type
29: PlotOrientation.VERTICAL,
30: true, true, false);
31:
32: final CategoryPlot plot = chart.getCategoryPlot();
33: plot.setForegroundAlpha(0.5f);
34:
35: chart.setBackgroundPaint(new Color(249, 231, 236));
An error occurred at line: 38 in the jsp file: /TestChart.jsp
ChartRenderingInfo cannot be resolved to a type
35: chart.setBackgroundPaint(new Color(249, 231, 236));
36:
37: try {
38: final ChartRenderingInfo info = new ChartRenderingInfo
39: (new StandardEntityCollection());
40:
41: final File file1 = new File("..//Workspaces//TestJSP//WebContent//WEB-INF//areachart.png");
An error occurred at line: 38 in the jsp file: /TestChart.jsp
ChartRenderingInfo cannot be resolved to a type
35: chart.setBackgroundPaint(new Color(249, 231, 236));
36:
37: try {
38: final ChartRenderingInfo info = new ChartRenderingInfo
39: (new StandardEntityCollection());
40:
41: final File file1 = new File("..//Workspaces//TestJSP//WebContent//WEB-INF//areachart.png");
An error occurred at line: 39 in the jsp file: /TestChart.jsp
StandardEntityCollection cannot be resolved to a type
36:
37: try {
38: final ChartRenderingInfo info = new ChartRenderingInfo
39: (new StandardEntityCollection());
40:
41: final File file1 = new File("..//Workspaces//TestJSP//WebContent//WEB-INF//areachart.png");
42:
An error occurred at line: 43 in the jsp file: /TestChart.jsp
ChartUtilities cannot be resolved
40:
41: final File file1 = new File("..//Workspaces//TestJSP//WebContent//WEB-INF//areachart.png");
42:
43: ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info);
44: } catch (Exception e) {
45: out.println(e);
46: }