Name
<jsp:output>
Synopsis
The
<jsp:output>
element can only be used in JSP Documents (JSP pages in XML syntax)
and tag files in XML syntax. It modifies properties of the generated
response.
Syntax
<jsp:output [omit-xml-declaration="true|yes|false|no"] [doctype-root-element="elementName
" [doctype-public="publicID
"] doctype-system="systemID
"] />
Attributes
Attribute name |
Java type |
Dynamic value accepted |
Description |
omit-xml-declaration |
boolean |
No |
Set to The default is |
doctype-root-element |
String |
No |
The root element name to use in the generated DOCTYPE declaration. |
doctype-public |
String |
No |
The Public ID to use in the generated DOCTYPE declaration. |
doctype-system |
String |
No |
The System ID to use in the generated DOCTYPE declaration. |
Example
<!-- Add an XML declaration to the response --> <jsp:output omit-xml-declaration="true" /> <!-- Add a DOCTYPE declaration to the response --> <jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system='http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'/>
Get JavaServer Pages, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.