当运行网页时,显示不了图表,请问是什么问题?是不是XML的配置有问题?
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=GBK">
<TITLE>[email protected]</TITLE>
</HEAD>
<BODY>
<map id="map0" name="map0">
<area shape="poly" coords="247,52,250,52,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E5%258D%259A%25E5%25A3%25AB%26amp%3BpieIndex%3D0" alt=""/>
<area shape="poly" coords="131,122,137,108,146,95,157,83,171,72,188,64,206,58,226,53,247,52,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E7%25A1%2595%25E5%25A3%25AB%26amp%3BpieIndex%3D0" alt=""/>
<area shape="poly" coords="336,198,321,208,305,215,287,220,269,223,250,224,231,223,212,220,194,215,178,207,163,198,151,188,141,176,134,163,130,150,129,136,131,122,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E6%259C%25AC%25E7%25A7%2591%26amp%3BpieIndex%3D0" alt=""/>
<area shape="poly" coords="316,66,336,78,352,93,363,110,369,129,369,148,363,166,352,183,336,198,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E5%25A4%25A7%25E4%25B8%2593%26amp%3BpieIndex%3D0" alt=""/>
<area shape="poly" coords="263,52,291,57,316,66,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E9%25AB%2598%25E4%25B8%25AD%26amp%3BpieIndex%3D0" alt=""/>
<area shape="poly" coords="250,52,263,52,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E9%25AB%2598%25E4%25B8%25AD%25E4%25BB%25A5%25E4%25B8%258B%26amp%3BpieIndex%3D0" alt=""/>
</map>
<P ALIGN="CENTER">
<img src="/WebRoot/servlet/DisplayChart?filename=jfreechart-6384.png" width=500 height=300 border=0 usemap="#map0">
</P>
</BODY>
</HTML>
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=GBK">
<TITLE>[email protected]</TITLE>
</HEAD>
<BODY>
<map id="map0" name="map0">
<area shape="poly" coords="247,52,250,52,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E5%258D%259A%25E5%25A3%25AB%26amp%3BpieIndex%3D0" alt=""/>
<area shape="poly" coords="131,122,137,108,146,95,157,83,171,72,188,64,206,58,226,53,247,52,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E7%25A1%2595%25E5%25A3%25AB%26amp%3BpieIndex%3D0" alt=""/>
<area shape="poly" coords="336,198,321,208,305,215,287,220,269,223,250,224,231,223,212,220,194,215,178,207,163,198,151,188,141,176,134,163,130,150,129,136,131,122,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E6%259C%25AC%25E7%25A7%2591%26amp%3BpieIndex%3D0" alt=""/>
<area shape="poly" coords="316,66,336,78,352,93,363,110,369,129,369,148,363,166,352,183,336,198,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E5%25A4%25A7%25E4%25B8%2593%26amp%3BpieIndex%3D0" alt=""/>
<area shape="poly" coords="263,52,291,57,316,66,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E9%25AB%2598%25E4%25B8%25AD%26amp%3BpieIndex%3D0" alt=""/>
<area shape="poly" coords="250,52,263,52,250,138,250,138" href="barview.jsp%3Fcategory%3D%25E9%25AB%2598%25E4%25B8%25AD%25E4%25BB%25A5%25E4%25B8%258B%26amp%3BpieIndex%3D0" alt=""/>
</map>
<P ALIGN="CENTER">
<img src="/WebRoot/servlet/DisplayChart?filename=jfreechart-6384.png" width=500 height=300 border=0 usemap="#map0">
</P>
</BODY>
</HTML>
解决方案 »
- 求源代码
- fusioncharts 中的柱状图 柱宽怎么设置
- jsp 做一个网页聊天室 需要什么技术(知识)本人初学者
- 怎么样用jsp和servlet来判断身份证号!!!
- hibernate 左连接 问题 ?
- 请哪位大侠对下面的项目描述提出一些技术问题~!~我在面试 想了解一下这方面的东西~
- 请问各位大侠:怎么样才能让一个ActionForm有另外一个class的属性?
- jsp连接MYSQL的问题
- 业务层和数据层(DAO)的增删改查(CRUD)方法到底用static的好还是非static的好?
- 高分求 WEB发布-在线等待!!急!!急!!急!!
- 求JAVA树型结构
- 刚装的tomcat,地址栏中出入http://localhost:8080,却没出现小猫,什么都没有!
楼主【dazui521】截止到2008-07-23 14:22:19的历史汇总数据(不包括此帖):
发帖的总数量:18 发帖的总分数:320 每贴平均分数:17
回帖的总数量:10 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:18 结贴的总分数:320
无满意结贴数:5 无满意结贴分:150
未结的帖子数:0 未结的总分数:0
结贴的百分比:100.00% 结分的百分比:100.00%
无满意结贴率:27.78 % 无满意结分率:46.88 %
敬礼!
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="org.jfree.data.general.DefaultPieDataset"%>
<%@ page import="org.jfree.chart.*"%>
<%@ page import="org.jfree.chart.plot.*"%>
<%@ page import="org.jfree.chart.servlet.ServletUtilities"%>
<%@ page import="org.jfree.chart.urls.StandardPieURLGenerator"%>
<%@ page import="org.jfree.chart.entity.StandardEntityCollection"%>
<%@ page import="java.io.*"%>
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=GBK">
<TITLE>jfreechart_test</TITLE>
</HEAD>
<BODY>
<% DefaultPieDataset data = new DefaultPieDataset();
data.setValue("高中以下",370);
data.setValue("高中",1530);
data.setValue("大专",5700);
data.setValue("本科",8280);
data.setValue("硕士",4420);
data.setValue("博士",80);
PiePlot3D plot = new PiePlot3D(data);//3D饼图
plot.setURLGenerator(new StandardPieURLGenerator("barview.jsp"));//设定链接
JFreeChart chart = new JFreeChart("",JFreeChart.DEFAULT_TITLE_FONT, plot, true);
chart.setBackgroundPaint(java.awt.Color.white);//可选,设置图片背景色
chart.setTitle("程序员学历情况调查表");//可选,设置图片标题
StandardEntityCollection sec = new StandardEntityCollection();
ChartRenderingInfo info = new ChartRenderingInfo(sec);
PrintWriter w = new PrintWriter(out);//输出MAP信息
//500是图片长度,300是图片高度
String filename = ServletUtilities.saveChartAsPNG(chart, 500, 300, info, session);
ChartUtilities.writeImageMap(w, "map0", info, false);
String graphURL = request.getContextPath() + "/servlet/DisplayChart?filename=" + filename;
%>
<P ALIGN="CENTER">
<img src="<%= graphURL %>" width=500 height=300 border=0 usemap="#map0">
</P>
</BODY>
</HTML>
<servlet-name>DisplayChart</servlet-name>
<servlet-class>
org.jfree.chart.servlet.DisplayChart
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DisplayChart</servlet-name>
<url-pattern>/servlet/DisplayChart</url-pattern>
</servlet-mapping>
这个能解释一下吗?我写到XML里就不能显示网页了,显示的是404错误。
我看出来,你的热点链接不可用。我也在头痛这个问题。
就是下面这种错误的href格式
href="barview.jsp%3Fcategory%3D%25E9%25AB%2598%25E4%25B8%25AD%26amp%3BpieIndex%3D0"
怎么解决????