如何使用GWT客户端下载文件? [英] How to download a file using GWT client?

查看:110
本文介绍了如何使用GWT客户端下载文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用GWT客户端下载PDF文件的最佳方式是什么?我应该调用一个普通的servlet来做到这一点吗?或者是有不同的首选方法来处理这个问题?



我是GWT的新手,所以如果一些示例代码会有很大的帮助。
$ b

感谢
Deep

解决方案

使用GET进行尝试...

  Window.open(GWT.getHostPageBaseURL()+FileRepository / doDownload?docId =+ dokument.getId(),, ); 


What is the best way to download a pdf file using GWT client ? Should I invoke a normal servlet to do that ? or is there a different preferred approach to handle this problem ?

I am new to GWT, so if some sample code would be of great help.

Thanks Deep

解决方案

Try it with GET...

Window.open(GWT.getHostPageBaseURL() + "FileRepository/doDownload?docId=" + dokument.getId(), "", "");

这篇关于如何使用GWT客户端下载文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆