Force "Save file" dialog on the JSP page
来源:互联网 发布:mac see sheer西柚色 编辑:程序博客网 时间:2024/05/22 04:50
If you want to force pop up "Save File" dialog to ask user save file from server.
We need to set the several parameter to response.
the first is content type.
response.setContentType("application/pdf"); // the type is the file type you want to user to save.
Another is content disposition.
This is very important when you want to force the save dialog. not matter if the browser has assicate some file type to open in the browser.
response.setHeader("Content-Disposition", "attachment;filename=/"somename/"");
Notice: attachment is very important here since it's force prompt the save file dialog.
- Force "Save file" dialog on the JSP page
- Disable The File Save Dialog
- silverlight:Save File Dialog
- autohotke Save any bitmaps on the clipboard to file
- DoSave save the current page
- IDl save the command line to file
- <%@ include file 和 <jsp:include page
- <%@ include file=""%>,<jsp:include page=""/>
- <jsp:include page>与<%@include file>
- The page you requested, favicon.ico, could not be found. in file **/system/core/Kohana.php on line 841
- About Create the Chart on web page.
- Failed to save the updated manifest to the file
- Failed to save the updated manifest to the file
- Failed to save the updated manifest to the file
- Failed to save the updated manifest to the file
- JSP中两种include方式(@include file、 jsp: include page)
- The Life Cycle of a JSP Page
- save the file in unicode format to prevent data loss.
- DelegateSimpleThreadPool
- Webwork项目总结(三)
- Content Type type
- 在Sql中编写函数功能分隔字符串(同VB的split)
- 翟鸿燊语录
- Force "Save file" dialog on the JSP page
- Singleton
- 调试ingres源代码(一)
- 以Android为起点,博客开始更新。
- JS中集合操作
- C#常用日期格式处理转换
- 《Hacking Vim》读书笔记:Vim中高级技巧
- window.location
- asp.net中发送Mail的简单实例