• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

contentType vs mimeType

 
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi...

What is the difference between

<%@ page contentType="text/html"%>
<%@ page mimeType="text/html"%>

Thanks
 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mime types are definitions of what kind of file. The content type uses mime types to tell the browser what to expect.

eg.

Mime Type: application/x-pdf = PDF File
Mime Type: text/plain = plain text file (no html formatting)
Mime Type: text/html = text file with html formatting..

Hope this helps.
 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by minu su:
What is the difference between

<%@ page contentType="text/html"%>
<%@ page mimeType="text/html"%>



The main difference is that the second one is incorrect since mimeType is not an attribute of the page directive.

Besides, the contentType attribute defines the MIME type and the character encoding for the response of the JSP page.
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic