HttpServletResponse.setContentType("application/pdf");
下列爲經常使用類型:
html
序號java |
值json |
類型app |
描述post |
1spa |
application/msword插件 |
docunix |
Microsoft Wordcode |
2orm |
application/octet-stream bin |
dms lha lzh exe class |
可執行程序 |
3 |
application/pdf |
Adobe Acrobat |
|
4 |
application/postscript |
ai eps ps |
PostScript |
5 |
appication/powerpoint |
ppt |
Microsoft Powerpoint |
6 |
appication/rtf |
rtf |
rtf 格式 |
7 |
appication/x-compress |
z |
unix 壓縮文件 |
8 |
application/x-gzip |
gz |
gzip |
9 |
application/x-gtar |
gtar |
tar 文檔 (gnu 格式 ) |
10 |
application/x-shockwave-flash |
swf |
MacroMedia Flash |
11 |
application/x-tar |
tar |
tar(4.3BSD) |
12 |
application/zip |
zip |
winzip |
13 |
audio/basic |
au snd |
sun/next 聲音文件 |
14 |
audio/mpeg |
mpeg mp2 |
Mpeg 聲音文件 |
15 |
audio/x-aiff |
mid midi rmf |
Midi 格式 |
16 |
audio/x-pn-realaudio |
ram ra |
Real Audio 聲音 |
17 |
audio/x-pn-realaudio-plugin |
rpm |
Real Audio 插件 |
18 |
audio/x-wav |
wav |
Microsoft Windows 聲音 |
19 |
image/cgm |
cgm |
計算機圖形元文件 |
20 |
image/gif |
gif |
COMPUSERVE GIF 圖像 |
21 |
image/jpeg |
jpeg jpg jpe |
JPEG 圖像 |
22 |
image/png |
png |
PNG 圖像 |
23 |
text/html |
html |
網頁 |
24 |
text/plain |
TXT |
文本 |
25 |
text/xml |
XML |
XML文檔 |
26 |
text/json | json |
JSON |