天天看點

JavaWeb使用response下載下傳檔案

JavaWeb使用response下載下傳檔案

最主要的就是寫doGet方法了,先上代碼。

關于<code>Content-Disposition</code> 的介紹:

傳送門

一個小問題,轉到

/

d

o

w

n

/down

/down 界面後提出

r

e

s

q

u

t

resquest

resquest後會自動下載下傳,而不會彈出提示框是否儲存,待解決。