package chart; public class BarChartBean { public static void main(String arg[]){ public JFreeChart getBarChart() { |
<%@ page contentType="image/jpeg"%> <%@ page import = "org.jfree.chart.*" %> <%@ page import ="chart.*"%> <% ServletOutputStream sos = response.getOutputStream(); BarChartBean bcb = new BarChartBean(); JFreeChart chart = bcb.getBarChart(); ChartUtilities.writeChartAsPNG(sos, chart, 400, 400); %> |
<%@ page contentType="text/html;charset=KSC5601"%> <html> <head><title>JFreeChart with JSP example</title></head> <body> <center> JFreeChart를 JSP 에서 사용하는 예제 <hr width="50%"> <img src="chart.jsp"> </center> </body> </html> |