J2ME之家

匿名投稿 投稿指南 RSS订阅 J2ME通告:
搜索: 您的位置主页>Java技术>J2EE>Servlet>

使用jfreereport在servlet中产生pdf文件报表

2008-8-7 07:32:08 来源:ITPUB 责任编辑:来自ITPUB论坛 【 点击: 我要投稿 [进入论坛]

{ /** * @see javax.servlet.http.HttpServlet#void (javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) */ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("application/pdf"); ServletOutputStream out = resp.getOutputStream(); try { // initialize JFreeReport Boot.start(); ReportConfiguration.getGlobalConfig().setLogLevel("Error"); // update the log system to use the new settings ... Log.getJFreeReportLog().init(); final URL in = getClass().getResource("/acme/web/resources/swing-icons.xml"); if (in == null) { throw new Exception("swing-icons.xml can't be found."); } final JFreeReport report = parseReport(in); report.setData(new

Tag:文件 报表 产生 使用 < > name basic-object /basic-object&
责任编辑:来自ITPUB论坛
  • 用户名: (新注册)密码: 匿名:  请文明参与讨论,禁止漫骂攻击。
    评论总数: [ 查看全部 ] 网友评论
    关于我们 - 在线帮助 - 网站动态 - 版权声明 - RSS订阅 - 网站地图 - 返回顶部