Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
7.2 HTTP 1.1 Response Headers and Their Meaning
149
unregistered types. The default MIME type for servlets is 
text/plain
, 
but servlets usually explicitly specify 
text/html
. They can, however, 
specify other types instead. For example, Section 7.5 (Using Servlets to 
Generate GIF Images) presents a servlet that builds a GIF image based 
upon input provided by specifying the 
image/gif
 content type, and 
Section 11.2 (The contentType Attribute) shows how servlets and JSP 
pages can generate Excel spreadsheets by specifying a content type of 
application/vnd.ms excel
.
Table 7.1 lists some the most common MIME types used by servlets. 
For more detail, many of the common MIME types are listed in RFC 
1521 and RFC 1522 (again, see 
http://www.rfc editor.org/
 for a 
list of RFC archive sites). However, new MIME types are registered all 
the time, so a dynamic list is a better place to look. The officially regis 
tered types are listed at 
http://www.isi.edu/in notes/iana/assign 
ments/media types/media types
. For common unregistered types, 
http://www.ltsw.se/knbase/internet/mime.htp
 is a good source. 
Table 7.1
Common MIME Types 
Type
Meaning
application/msword
Microsoft Word document
application/octet stream
Unrecognized or binary data
application/pdf
Acrobat (.pdf) file
application/postscript
PostScript file
application/vnd.lotus notes
Lotus Notes file
application/vnd.ms excel
Excel spreadsheet
application/vnd.ms powerpoint
Powerpoint presentation
application/x gzip
Gzip archive
application/x java archive
JAR file
application/x java serial 
Serialized Java object
ized object
application/x java vm
Java bytecode (.class) file
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

jsp web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved