且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 Servlet 下载文件时如何使用 GWT?

更新时间:2023-10-02 09:42:10

在客户端,只需创建一个常规的 标签.如果要动态创建它,可以使用 Anchor 类.当用户点击链接时,浏览器会自动下载文件.

On the client side, just create a regular <a href="path/to/servlet"> tag. You can use the Anchor class if you want to dynamically create it. When the user clicks the link, the browser will automatically download the file.