如何使用Java在客户端创建保存文件 [英] How to create save file on client side using java

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

问题描述

我制作了一个servlet,可以创建一个excel文件.但是,当客户端访问该servlet时,文件将存储在服务器上.我想将其存储在客户端.
如何在java.

I have made a servlet which creates a excel file. But when client access this servlet the file stores on the server. I want to store it on the client side.
How to do this in java.

推荐答案

中没有任何Web应用程序可以访问客户端的硬盘.您无法写入客户端的硬盘...


您需要将响应写到客户端的浏览器上,该浏览器会将excel表放在页面上,客户端可以决定是保存还是取消.
No webapplication has access to the client''s hard disk. You cannot write to client''s hard disk...


You need to write the response to the client''s browser which will throw the excel sheet on to the page and the client can decide whether to save it or cancel.


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

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