好像说你这个database.Login转型出错。
解决方案 »
- JDK1.6 自带webservice构建
- 写毕业设计的中英文翻译
- Web服务-Axis返回自定义数据类型的问题
- 在RCP使用jasperreport的问题
- Spring中的applicationContext.xml配置的问题?
- 请hibernnate中,单表数据保存
- jboss服务器一小时重起一次,严重问题,望高手帮忙,在线等。。。。。。
- 哪里有免费的SMTP服务器?
- 小弟出来次地,有一个棘手的问题,有会用JAVA编写DFT和FFT的高人吗?
- hotenM(CMP)大侠等EJB大侠进来!小问题请教!
- 急! 有了解xml/edi的吗? ?一定加分
- 如何用JAVA把数据批量从oracle中取出,再批量地插入到mysql中
页面如下:
<table border="0" align="center" width="760" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<img src="./chart?filename=<%chartname%>" width="600" height="400">
</td>
</tr>
</table>
其中的chartname需要你在程序中压出来
在java中,这里调用了一个jfreechart中的类
String chartname = ChartBuilder.buildCurveXYChart("注释1", Vector对象, "注释2", "注释3", 600, 400, session);其中buildCurveXYChart的定义如下private static Font titleFont = new Font("黑体", Font.CENTER_BASELINE, 18);
private static Font plotFont = new Font("黑体", Font.CENTER_BASELINE, 12);
private static Font legendFont = new Font("黑体", Font.CENTER_BASELINE, 10);public static String buildCurveXYChart(
String title, Vector data, String xLbl, String valueLbl,
int width, int height, HttpSession session) {
XYDataset dataSet = DatasetFactory.createCurveXYDataset(data, 200);
JFreeChart chart;
chart = ChartFactory.createXYLineChart(title, xLbl, valueLbl, dataSet, PlotOrientation.VERTICAL, true, true, false);
chart.getTitle().setFont(titleFont);
((StandardLegend)chart.getLegend()).setItemFont(legendFont);
chart.getXYPlot().getDomainAxis().setLabelFont(plotFont);
chart.getXYPlot().getRangeAxis().setLabelFont(plotFont);
try {
return ServletUtilities.saveChartAsPNG(chart, width, height, session);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}最后把 chartname 压入页面,希望对你有所帮助