Class 2 |
Intermediate Java 30-IT-397 |
|
The contentType Attribute
-
Sets the content-type of the response.
-
Usually text/html, but there are other options. Called the MIME type
for Multiple Internet Messaging Extensions
-
Example: <%@ page contentType="image/gif" %>
-
You can do the same thing without page, but with the response object.
<% response.setContentType("image/gif"); %>
Example

Created by: Brandan Jones
December 20, 2001