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.jar就是可以在项目中使用的jar包,smartgwt-skins.jar就是主题包。
分为入门 , 进阶 , 高级三个部分,是学习GWT的好东西,绝对值3个分数
gwt-2.5.1—part1.rar part2:http://download.csdn.net/detail/u011029071/5992583
GWT Designer 7.x 是Google Web Toolkit的最佳可视化开发工具,所见即所得,即拖即用,使你能够非常容易地在可视化环境下开发AJAX应用程序。...http://www.instantiations.com/gwtdesigner/download.html
NULL 博文链接:https://mydownload.iteye.com/blog/1157105
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 ...
NULL 博文链接:https://mydownload.iteye.com/blog/1292118
代码实例,演示 smartgwt 项目如何实现国际化(测试语种:英文,中文,德文),可直接导入至 MyEclipse. Maven 版链接:http://download.csdn.net/source/3036062
NULL 博文链接:https://mydownload.iteye.com/blog/1289377
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: ...
11,文件下载(download,通过表单方式) 完成 2007年8月6日 10,阻止事件传到父对象 2007年7月31日 9,文件上传客户端(upload隐藏表单) 2007年7月29日 8,不换行:表格字符、多种widget的组合 计划中 7,css的...
EXT-GWT2.1.0 java api 文档 chm格式方便查找2010年7月制作 完美的搜索,支持全文检索功能。另新版本EXT-GWT2.2.0 java api 已可用请到http://download.csdn.net/source/2700814 下载
GWT浏览器插件离线安装包,针对IE的64位安装包,32位安装包转到http://download.csdn.net/detail/promingx/4236601
/root/download/GWT Pragmatic book.pdf
NULL 博文链接:https://mydownload.iteye.com/blog/1341388
part2:http://download.csdn.net/detail/u011029071/5986791 安装方法http://blog.csdn.net/u011029071/article/details/10143841
最新的gwt-windows 很好用,没毒,放心
NULL 博文链接:https://mydownload.iteye.com/blog/1297157
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 网站上只有HSQLDB的实例,没有MySQL的。花了2天工夫,找了国内外一些网站和论坛,终于跑成功了,现打包供各位同好参考。已经包含所有jar包,通过MyEclipse>File>Import>Exist Projects~>Select archive~>...