Response.setheader ("content-disposition", "attachmentFilename=" downloaded file name); Note: Let response call the setheader method to add the downloaded header to the browser of the client, and the browser will open the corresponding download dialog box after receiving the header.