Struts支持的contentType

‘ez‘ => ‘application/andrew-inset‘,
‘hqx‘ => ‘application/mac-binhex40‘,
‘cpt‘ => ‘application/mac-compactpro‘,
‘doc‘ => ‘application/msword‘,
‘bin‘ => ‘application/octet-stream‘,
‘dms‘ => ‘application/octet-stream‘,
‘lha‘ => ‘application/octet-stream‘,
‘lzh‘ => ‘application/octet-stream‘,
‘exe‘ => ‘application/octet-stream‘,
‘class‘ => ‘application/octet-stream‘,
‘so‘ => ‘application/octet-stream‘,
‘dll‘ => ‘application/octet-stream‘,
‘oda‘ => ‘application/oda‘,
‘pdf‘ => ‘application/pdf‘,
‘ai‘ => ‘application/postscript‘,
‘eps‘ => ‘application/postscript‘,
‘ps‘ => ‘application/postscript‘,
‘smi‘ => ‘application/smil‘,
‘smil‘ => ‘application/smil‘,
‘mif‘ => ‘application/vnd.mif‘,
‘xls‘ => ‘application/vnd.ms-excel‘,
‘ppt‘ => ‘application/vnd.ms-powerpoint‘,
‘wbxml‘ => ‘application/vnd.wap.wbxml‘,
‘wmlc‘ => ‘application/vnd.wap.wmlc‘,
‘wmlsc‘ => ‘application/vnd.wap.wmlscriptc‘,
‘bcpio‘ => ‘application/x-bcpio‘,
‘vcd‘ => ‘application/x-cdlink‘,
‘pgn‘ => ‘application/x-chess-pgn‘,
‘cpio‘ => ‘application/x-cpio‘,
‘csh‘ => ‘application/x-csh‘,
‘dcr‘ => ‘application/x-director‘,
‘dir‘ => ‘application/x-director‘,
‘dxr‘ => ‘application/x-director‘,
‘dvi‘ => ‘application/x-dvi‘,
‘spl‘ => ‘application/x-futuresplash‘,
‘gtar‘ => ‘application/x-gtar‘,
‘hdf‘ => ‘application/x-hdf‘,
‘js‘ => ‘application/x-javas
cript‘,
‘skp‘ => ‘application/x-koan‘,
‘skd‘ => ‘application/x-koan‘,
‘skt‘ => ‘application/x-koan‘,
‘skm‘ => ‘application/x-koan‘,
‘latex‘ => ‘application/x-latex‘,
‘nc‘ => ‘application/x-netcdf‘,
‘cdf‘ => ‘application/x-netcdf‘,
‘sh‘ => ‘application/x-sh‘,
‘shar‘ => ‘application/x-shar‘,
‘swf‘ => ‘application/x-shockwave-flash‘,
‘sit‘ => ‘application/x-stuffit‘,
‘sv4cpio‘ => ‘application/x-sv4cpio‘,
‘sv4crc‘ => ‘application/x-sv4crc‘,
‘tar‘ => ‘application/x-tar‘,
‘tcl‘ => ‘application/x-tcl‘,
‘tex‘ => ‘application/x-tex‘,
‘texinfo‘ => ‘application/x-texinfo‘,
‘texi‘ => ‘application/x-texinfo‘,
‘t‘ => ‘application/x-troff‘,
‘tr‘ => ‘application/x-troff‘,
‘roff‘ => ‘application/x-troff‘,
‘man‘ => ‘application/x-troff-man‘,
‘me‘ => ‘application/x-troff-me‘,
‘ms‘ => ‘application/x-troff-ms‘,
‘ustar‘ => ‘application/x-ustar‘,
‘src‘ => ‘application/x-wais-source‘,
‘xhtml‘ => ‘application/xhtml+xml‘,
‘xht‘ => ‘application/xhtml+xml‘,
‘zip‘ => ‘application/zip‘,
‘au‘ => ‘audio/basic‘,
‘snd‘ => ‘audio/basic‘,
‘mid‘ => ‘audio/midi‘,
‘midi‘ => ‘audio/midi‘,
‘kar‘ => ‘audio/midi‘,
‘mpga‘ => ‘audio/mpeg‘,
‘mp2‘ => ‘audio/mpeg‘,
‘mp3‘ => ‘audio/mpeg‘,
‘aif‘ => ‘audio/x-aiff‘,
‘aiff‘ => ‘audio/x-aiff‘,
‘aifc‘ => ‘audio/x-aiff‘,
‘m3u‘ => ‘audio/x-mpegurl‘,
‘ram‘ => ‘audio/x-pn-realaudio‘,
‘rm‘ => ‘audio/x-pn-realaudio‘,
‘rpm‘ => ‘audio/x-pn-realaudio-plugin‘,
‘ra‘ => ‘audio/x-realaudio‘,
‘wav‘ => ‘audio/x-wav‘,
‘pdb‘ => ‘chemical/x-pdb‘,
‘xyz‘ => ‘chemical/x-xyz‘,
‘bmp‘ => ‘image/bmp‘,
‘gif‘ => ‘image/gif‘,
‘ief‘ => ‘image/ief‘,
‘jpeg‘ => ‘image/jpeg‘,
‘jpg‘ => ‘image/jpeg‘,
‘jpe‘ => ‘image/jpeg‘,
‘png‘ => ‘image/png‘,
‘tiff‘ => ‘image/tiff‘,
‘tif‘ => ‘image/tiff‘,
‘djvu‘ => ‘image/vnd.djvu‘,
‘djv‘ => ‘image/vnd.djvu‘,
‘wbmp‘ => ‘image/vnd.wap.wbmp‘,
‘ras‘ => ‘image/x-cmu-raster‘,
‘pnm‘ => ‘image/x-portable-anymap‘,
‘pbm‘ => ‘image/x-portable-bitmap‘,
‘pgm‘ => ‘image/x-portable-graymap‘,
‘ppm‘ => ‘image/x-portable-pixmap‘,
‘rgb‘ => ‘image/x-rgb‘,
‘xbm‘ => ‘image/x-xbitmap‘,
‘xpm‘ => ‘image/x-xpixmap‘,
‘xwd‘ => ‘image/x-xwindowdump‘,
‘igs‘ => ‘model/iges‘,
‘iges‘ => ‘model/iges‘,
‘msh‘ => ‘model/mesh‘,
‘mesh‘ => ‘model/mesh‘,
‘silo‘ => ‘model/mesh‘,
‘wrl‘ => ‘model/vrml‘,
‘vrml‘ => ‘model/vrml‘,
‘css‘ => ‘text/css‘,
‘html‘ => ‘text/html‘,
‘htm‘ => ‘text/html‘,
‘asc‘ => ‘text/plain‘,
‘txt‘ => ‘text/plain‘,
‘rtx‘ => ‘text/richtext‘,
‘rtf‘ => ‘text/rtf‘,
‘sgml‘ => ‘text/sgml‘,
‘sgm‘ => ‘text/sgml‘,
‘tsv‘ => ‘text/tab-separated-values‘,
‘wml‘ => ‘text/vnd.wap.wml‘,
‘wmls‘ => ‘text/vnd.wap.wmlscript‘,
‘etx‘ => ‘text/x-setext‘,
‘xsl‘ => ‘text/xml‘,
‘xml‘ => ‘text/xml‘,
‘mpeg‘ => ‘video/mpeg‘,
‘mpg‘ => ‘video/mpeg‘,
‘mpe‘ => ‘video/mpeg‘,
‘qt‘ => ‘video/quicktime‘,
‘mov‘ => ‘video/quicktime‘,
‘mxu‘ => ‘video/vnd.mpegurl‘,
‘avi‘ => ‘video/x-msvideo‘,
‘movie‘ => ‘video/x-sgi-movie‘,
‘ice‘ => ‘x-conference/x-cooltalk‘

通常使用application/octet-stream 即可

时间: 2024-10-22 09:41:16

Struts支持的contentType的相关文章

Struts 2初体验

Struts2简介: Struts2是一个基于MVC设计模式的Web应用框架,它本质上相当于一个servlet,在MVC设计模式中,Struts2作为控制器(Controller)来建立模型与视图的数据交互. Struts 2 目录结构: apps目录:Struts2示例应用程序 docs目录:Struts2指南.向导.API文档 lib目录:Struts 2的发行包及其依赖包 src目录:Struts 2项目源代码 使用Struts 2 开发程序的基本步骤 --手动添加Struts支持 1.第

Struts2与Struts的区别

从Struts2的发展过程来看,Struts2继承了Struts与WebWork的血脉,Struts2取两者之精华,形成新德框架,但是struts2还是更多的继承了struts的设计思想,并加入了WebWork的优点.在了解Struts2体系之前,让我们先看看struts2对struts做了哪些修改. Struts2与struts的不同主要体现在以下几个方面. (1)  Action类 1>在struts中都是使用抽象类编程而不是接口,因此他要求开发Action类继承一个抽象的基类,如Dispa

Http请求中Content-Type讲解以及在Spring MVC中的应用

引言: 在Http请求中,我们每天都在使用Content-type来指定不同格式的请求信息,但是却很少有人去全面了解content-type中允许的值有多少,这里将讲解Content-Type的可用值,以及在Spring MVC中如何使用它们来映射请求信息. 1.  Content-Type MediaType,即是Internet Media Type,互联网媒体类型:也叫做MIME类型,在Http协议消息头中,使用Content-Type来表示具体请求中的媒体类型信息. [html] vie

Struts+Hibernate+Spring面试题合集及答案

Struts+Hibernate+Spring面试题合集及答案 Struts+Hibernate+Spring面试题合集 1 1. Hibernate部分 2 1.1. Hibernate工作原理 2 1.2. 什么是Hibernate的并发机制?怎么处理并发问题? 2 1.3. Hibernate自带的分页机制是什么?如果不使用Hibernate自带的分页,则采用什么方式分页? 3 1.4. hibernate的对象的三种持久化状态,并给出解释? 3 1.5. hibernate的三种状态之间

用MyEclipse搭建SSH框架 Struts Spring Hibernate

1.new一个web project.2.右键项目,为项目添加Struts支持.点击Finish.src目录下多了struts.xml配置文件. 3.使用MyEclipse DataBase Explorer建立数据源. new一个数据源.填入数据源信息.点击test Driver,如果成功显示:点击OK,点击Finish. 4.为项目添加Spring支持.选择五个包,之后JAR Library Installation为如下图.点击Next. 默认点击Finish. 5.为项目添加Hibern

response的contentType 几种类型

ajax开发中在请求server端的响应时, 对于每一种返回类型 规范的做法是要在服务端指定response的contentType 的. (当然 不指定绝大多数情况下也没什么问题 尤其是返回"非xml"的时候) . 常遇到以下的几种情况: 1. 服务端须要返回一段普通文本给client,Content-Type="text/plain" 2 .服务端须要返回一段HTML代码给client ,Content-Type="text/html" 3

Struts与Struts2的区别

Struts与Struts2的区别 首先看一张Struts2的发展路线图:       从Struts2的发展过程来看,Struts2继承了Struts与Webwork的特性,形成了新的框架.但是它的称呼只是在“Struts”后面添加一个“2”,显然Struts2还是更多的继承了Struts的设计思想,并加入了WebWork的特点.下面将从十个方面来说明Struts与Struts2之间的不同点: (1)Action类 在Struts中都是使用抽象类编程而不是接口,因此它要求开发的Action类继

Struts 基础开发---day01

前言 我是一个小白,今天首次学习Struts的基本内容,是看视频和看书相结合的,主要是记录这个学习的过程以及学习的过程中遇到的问题. ----------------------------------------------------------------------------------------------------------------------------------- 传统的MVC分为servlet(控制器),Javabean(模型层),jsp(显示层)三个部分,Str

Struts在jsp页面中的一些运用

计应134(实验班) 陈帮政 当Struts配置好了之后我们可以在jsp页面中运用Struts来进行表单的提交. Struts支持a标签,form表单等方式传值a标签通过herf标签来和Struts进行交互在herf中可以通过herf="xxx.acrion?yy=想传入的值"来进行值的传输 在form中则在action中指定Struts响应的action 如:<form action="Studentmassage.action"></form&