• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what are the allowed content types?

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Response.setContentType("text/html")

how to set other values like word, excel...etc.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can specify a return type of anything you'd like. Whether the browser has the capability to do anything meaningful with it, is a different matter.
 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I did not understand your answer.
How to know what are the valid values.

if I give like response.setContentType("text/word") then how come explorer understands this?.
 
Sivasundaram Umapathy
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MIME types are assigned by IANA. The browsers have MIME handlers which can open the content according to the MIME types. It is very similar to the automatic opening of your default media player when you a a click on a .mp3 file.
 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Siva.
 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Siva.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic