[b]jfreechart版本[/b]:1.0.13
maven依赖配置:
<dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.13</version>
</dependency>
参考资源1:
[url=http://blog.youkuaiyun.com/itfat/article/details/6110775]http://blog.youkuaiyun.com/itfat/article/details/6110775[/url]
但如果在jsp中展示图片时使用
<% String fileName = ServletUtilities.saveChartAsJPEG(ChartUtil.createChart(), 450, 300, session);
String graphURL = request.getContextPath() + [color=red]"/DisplayChart[/color]?filename=" + fileName;
%>
则在访问页面时,显示的是叉叉,倘若配置成
<%
String graphURLline = request.getContextPath() + [color=red]"/servlet/DisplayChart[/color]?filename="
+ filenameline;
%>
则可正常显示
参考资源2:
[url=http://www.huosen.net/archives/156.html]http://www.huosen.net/archives/156.html[/url]
API:
[url=http://www.jfree.org/jfreechart/api/javadoc/index.html]http://www.jfree.org/jfreechart/api/javadoc/index.html[/url]
maven依赖配置:
<dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.13</version>
</dependency>
参考资源1:
[url=http://blog.youkuaiyun.com/itfat/article/details/6110775]http://blog.youkuaiyun.com/itfat/article/details/6110775[/url]
但如果在jsp中展示图片时使用
<% String fileName = ServletUtilities.saveChartAsJPEG(ChartUtil.createChart(), 450, 300, session);
String graphURL = request.getContextPath() + [color=red]"/DisplayChart[/color]?filename=" + fileName;
%>
则在访问页面时,显示的是叉叉,倘若配置成
<%
String graphURLline = request.getContextPath() + [color=red]"/servlet/DisplayChart[/color]?filename="
+ filenameline;
%>
则可正常显示
参考资源2:
[url=http://www.huosen.net/archives/156.html]http://www.huosen.net/archives/156.html[/url]
API:
[url=http://www.jfree.org/jfreechart/api/javadoc/index.html]http://www.jfree.org/jfreechart/api/javadoc/index.html[/url]