在客户端,只需创建一个常规的
标签.如果要动态创建它,可以使用 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.