Specifies directives and misc. options to the page parser.

Current directives are:

The mime type for the page (sent to client as part of the response header).

The value of "none" or an empty string will turn off writing any mimetype entirely (the user can then manually write a mimetype via the javax.servlet.ServletResponse.setContentType method manually).

If not specified, the default mimetype is: Page.DEFAULT_MIME_TYPE ("text/html")

This is the charset encoding sent to the client in the HTTP response header.

If not specified, the default mimetype is: Page.DEFAULT_ENCODING ("ISO-8859-1")

This is the charset encoding of the molly source page.

See Charset discussion on when to use this.

The buffer size for the page. The page is sent to the client once the buffer size is reached.

If not specified, the default size is: Page.DEFAULT_BUFFER_SIZE ("8048")

Specifies whether to use a ServletResponse outputstream or a ServletResponse PrintWriter. Valid values are outputstream, stream (either of which choose the outputstream) or writer (for the printwriter).
Removes any initial empty lines from the output. Empty lines can happen because of molly tags that are separated by empty lines (the empty lines are sent to the client since they becomes part of the textual section)


Page directives can appear anywhere in text sections.
[page ..directive.. ]

Quotes are optional for directive values. For example: [page mimetype=foo/bar] and [page mimetype="foo/bar"] are both valid directives.


To prevent the tag from being recognized, this tag can be escaped by prefixing the start tag with a backslash: \[page


A page with a plain text mime-type (which prevents the browser from interpreting it as HTML).
[page mimetype='text/plain']
<body> <table><tr><td>test</td></tr></table> </body>