Why should we setContentType() in servlet ?what is the use of that method?

Showing Answers 1 - 4 of 4 Answers

bhanu

  • Jun 23rd, 2006
 

to intimate the browser that which type of content is coming as response,Depending upon the contentType browser treats with the response.

Lawrance

  • Jul 3rd, 2006
 

ContentType is also called as MIME(MultipurposeInternetMailExtension)type Using this type we can set the response to the client or browser or useragent it will  give the response based upon the ContentType

                  default MIME type is("text/html")

  Was this answer useful?  Yes

Sangram Behera

  • Jul 27th, 2006
 

To tell the browser what type of output posted from server.

Ex :  text/html

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions