Advertisement
MIME Type Values | Description |
---|---|
text/html | HTML Document |
text/plain | Plain Text Document |
text/xml | XML Document |
text/css | Casacading Style Sheets |
image/png | PNG Image |
image/gif | GIF Image |
image/jpeg | JPEG Image |
mpeg/video | MPEG Video Clip. |
audio/midi | MIDI Audio File. |
application/pdf | PDF File |
application/word | MS-WORD File |
<!–– Example of contentType attribute of page directive of JSP -->
<html>
<head>
<title>The contentType Attribute</title>
</head>
<body>
Setting the contentType to text/plain
<br/>
<%@ page contentType = "text/plain" %>
<b>This is going to be displayed as a plain text only to the user.</b>
</body>
</html>
Advertisement
<!–– Example of contentType attribute of page directive of JSP -->
<html>
<head>
<title>The contentType Attribute</title>
</head>
<body>
Setting contentType to text/xml.
<br/>
<%@ page contentType = "text/xml" %>
<b>The text on this page going to be displayed only in the form of text/xml to the user.</b>
</body>
</html>
<!–– Example of contentType attribute of page directive of JSP -->
<html>
<head>
<title>The contentType Attribute</title>
</head>
<body>
Setting the contentType to text/plain
<br/>
<%@ page contentType = "text/html" %>
<b>The text on this page is displayed only in the form of html to user.</b>
</body>
</html>
Advertisement
Advertisement
Please check our latest addition
C#, PYTHON and DJANGO
Advertisement