JFreeChart 学习(1)-获取图片

jfreechart版本:1.0.13
maven依赖配置:
<dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.13</version>
</dependency>


参考资源1:
http://blog.csdn.net/itfat/article/details/6110775
但如果在jsp中展示图片时使用
<% String fileName = ServletUtilities.saveChartAsJPEG(ChartUtil.createChart(), 450, 300, session); 
String graphURL = request.getContextPath() + "/DisplayChart?filename=" + fileName;
%>
则在访问页面时,显示的是叉叉,倘若配置成
<%
String graphURLline = request.getContextPath() + "/servlet/DisplayChart?filename="
+ filenameline;
%>
则可正常显示

参考资源2:
http://www.huosen.net/archives/156.html

API:
http://www.jfree.org/jfreechart/api/javadoc/index.html

你可能感兴趣的:(jfreechart)