title: How can i display pie chart in jsp page?
body: <pre><code>&lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd"&gt;
  
  &lt;%@ page import="java.awt.*"%&gt;
  &lt;%@ page import="java.io.*"%&gt;
  &lt;%@ page import="org.jfree.chart.*"%&gt;
  &lt;%@ page import="org.jfree.chart.entity.*"%&gt;
  &lt;%@ page import="org.jfree.data.general.*"%&gt;
  
  &lt;%
      DefaultPieDataset pieDataset = new DefaultPieDataset();
      pieDataset.setValue("JavaWorld", new Integer(75));
      pieDataset.setValue("Other", new Integer(25));
      JFreeChart chart = ChartFactory.createPieChart("Sample Pie Chart",pieDataset,true,true,false);
  %&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  &lt;title&gt;Pie Chart&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;IMG SRC="piechart.png" WIDTH="600" HEIGHT="400" BORDER="0"
          USEMAP="#chart"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Output for this is a blank screen, It not thrown any exception..</p>
  
  <p>How can i display pie chart in this page?</p>
  
  <p>Thanks in advance.</p>