`
ldsjdy
  • 浏览: 147834 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

GWT Download

    博客分类:
  • GWT
 
阅读更多

GWT 下载导入的模板
final FormPanel download = new FormPanel();
    download.setAction(GWT.getHostPageBaseURL() + "download");
    download.setMethod(FormPanel.METHOD_POST);
    Button dl = new Button("Download");
    dl.addClickHandler(new ClickHandler()
    {
      public void onClick(ClickEvent event)
      {
        download.submit();
      }
    });


servlet:

protected void doPost(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException
  {
    System.out.println("file download");

    String fileName = "ProductImportTemplate.xls";
    response.setContentType("application/force-download;charset=UTF-8");
    response.addHeader("Content-Disposition", "attachment;filename=\"" + fileName + "\"");
//    PrintWriter pw = new PrintWriter(response.getOutputStream());
//    pw.write("test.....");
//    pw.flush();
//    pw.close();
    
//    String path = request.getContextPath()+"/downloads/ProductImportTemplate.xls";
//    System.out.println("path: " + path);
//    response.sendRedirect(path);

  }
分享到:
评论

相关推荐

    SmartGWT 12.0

    SmartGWT最新的免费包,版本是12.0。里面包含的smartgwt.jar就是可以在项目中使用的jar包,smartgwt-skins.jar就是主题包。

    GWT完整教程,Word版

    分为入门 , 进阶 , 高级三个部分,是学习GWT的好东西,绝对值3个分数

    gwt-2.5.1—part1.rar

    gwt-2.5.1—part1.rar part2:http://download.csdn.net/detail/u011029071/5992583

    GWT Designer 7.x 破解 注册机

    GWT Designer 7.x 是Google Web Toolkit的最佳可视化开发工具,所见即所得,即拖即用,使你能够非常容易地在可视化环境下开发AJAX应用程序。...http://www.instantiations.com/gwtdesigner/download.html

    GWT简介.docx

    NULL 博文链接:https://mydownload.iteye.com/blog/1157105

    GWT数据库管理系统

    3) Download the source code from the files section of this group and extract to a separate directory. 4) Copy the contents of the src file for the chapter you want to run to the src file in the ...

    GWT通信机制初探

    NULL 博文链接:https://mydownload.iteye.com/blog/1292118

    SmartGwt I18N 国际化/本地化

    代码实例,演示 smartgwt 项目如何实现国际化(测试语种:英文,中文,德文),可直接导入至 MyEclipse. Maven 版链接:http://download.csdn.net/source/3036062

    spring集成gwt的办法

    NULL 博文链接:https://mydownload.iteye.com/blog/1289377

    GWT Best Practices

    Feel free to download the source and run it. It's all set to go for Eclipse. You'll only need to add the apt generator per: ...

    gwt项目开发的经验集

    11,文件下载(download,通过表单方式) 完成 2007年8月6日 10,阻止事件传到父对象 2007年7月31日 9,文件上传客户端(upload隐藏表单) 2007年7月29日 8,不换行:表格字符、多种widget的组合 计划中 7,css的...

    EXT-GWT 2.1.0 API Doc chm版(新版本已可用)

    EXT-GWT2.1.0 java api 文档 chm格式方便查找2010年7月制作 完美的搜索,支持全文检索功能。另新版本EXT-GWT2.2.0 java api 已可用请到http://download.csdn.net/source/2700814 下载

    gwt-dev-plugin-x64.msi

    GWT浏览器插件离线安装包,针对IE的64位安装包,32位安装包转到http://download.csdn.net/detail/promingx/4236601

    GWT Pragmatic book.pdf

    /root/download/GWT Pragmatic book.pdf

    GWT部署

    NULL 博文链接:https://mydownload.iteye.com/blog/1341388

    gwt-2.5.1.part1.rar

    part2:http://download.csdn.net/detail/u011029071/5986791 安装方法http://blog.csdn.net/u011029071/article/details/10143841

    gwt-windows-1.7.0.zip

    最新的gwt-windows 很好用,没毒,放心

    Java和GWT应用开发.pdf

    NULL 博文链接:https://mydownload.iteye.com/blog/1297157

    EXT-GWT2.0.1 API DOC.chm(新版本已可用请看软件说明)

    EXT-GWT2.0.1 java api 文档 chm格式方便查找2009年9月...新版本解决了旧版的部分搜索问题,并且api升级到了2.1.0版,EXT-GWT2.1.0 java api 文档 chm格式 2010年7月制作,地址http://download.csdn.net/source/2546841

    SmartGWT + MySQL 小实例

    SmartGWT 网站上只有HSQLDB的实例,没有MySQL的。花了2天工夫,找了国内外一些网站和论坛,终于跑成功了,现打包供各位同好参考。已经包含所有jar包,通过MyEclipse>File>Import>Exist Projects~>Select archive~>...

Global site tag (gtag.js) - Google Analytics