The J2EETM Tutorial
Home
TOC
Index
PREV TOP NEXT Search
Feedback

Creating Static Content

You create static content in a JSP page by simply writing it as if you were creating a page that consisted only of that content. Static content can be expressed in any text-based format, such as HTML, WML, and XML. The default format is HTML. If you want to use a format other than HTML, you include a page directive with the contentType attribute set to the format type at the beginning of your JSP page. For example, if you want a page to contain data expressed in the wireless markup language (WML), you need to include the following directive:

<%@ page contentType="text/vnd.wap.wml"%>
 

A registry of content type names is kept by the IANA at:

ftp://ftp.isi.edu/in-notes/iana/assignments/media-types
 
Home
TOC
Index
PREV TOP NEXT Search
Feedback