使用gwt的RequestBuilder下载文件 [英] file download using RequestBuilder of gwt

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

问题描述

我需要实现文件下载。我不想要任何服务器端的文件URL直接下载。我创建了一个servlet,它将打开该文件并将其写入到响应流中。现在来到gwt我有onResponseReceived (请求请求,响应响应)将在接收到响应时调用。现在如何进一步? 。我需要的操作是,文件流应该被下载到客户端计算机。

I need to implement file download .I don't want give any server side file urls to download directly .I created a servlet which will open the file and write it to stream of response.Now coming to front gwt i have onResponseReceived(Request request, Response response) which will be called on receiving the response .Now how to proceed further? .My operation required is ,file in stream should be downloaded to client computer.

可以帮助我吗?

推荐答案

你可以使用任何_blank,_parent,_top,_self

You could use any of _blank, _parent, _top, _self


  • _ blank属性导致
    atarget超链接在
    a中打开新的

  • _ top属性导致target
    的超链接显示在所有当前定义的
    框架集的
    顶层。

  • _ parent属性导致
    目标的超链接,以在当前
    框架集的整个区域中显示

  • _ self属性导致目标
    的超链接在
    当前框架中打开。

  • "_blank" attribute causes the "target" of the hyperlink to open in a new
  • "_top" attribute causes the "target" of the hyperlink to display at the top level of all currently defined framesets.
  • "_parent" attribute causes the "target" of the hyperlink to display in the entire area of the current frameset.
  • "_self" attribute causes the "target" of the hyperlink to open in the current frame.

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

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