• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in setContentType() Method

 
Chella
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
In My web application usually I use res.setContentType("text/html").
when i was googling, i came to know that this method has values like,
"application/vnd.ms-excel"
"application/x-msdownload" etc.,
What i want is, can any one give me the complete list of values of setContentType() method and also the usage of those values.You can Suggest me the useful URL's also..

Bye..
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"chella",
Please check your private messages.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The value is also known as the 'mime' type.
There is a good description here.

In short, when you set the content type, you're telling the client (usually a browser) what type of content you're sending.

A complete list would be very long.
What container are you using?
 
Mason Zhao
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Ben,

I also need the content type complete list, could you please send me the URL or post it publicly?

Thanks a lot!
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just googled "mime type" and got a lot of information...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Asking for a complete list of mime types is like asking for a complete list of applications.

If you have a copy of Tomcat, look in tomcat/conf/web.xml.
There is a section in there with a list of the common ones that a web server would be expected to have, out of the box.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!