Package com.opensymphony.module.sitemesh
Interface HTMLPage
- All Superinterfaces:
Page
- All Known Implementing Classes:
AbstractHTMLPage,Content2HTMLPage,FastPage,PartialPageParserHtmlPage,TokenizedHTMLPage
Extension of
Page providing access to HTML data.
The page is parsed and the <title>, <head> (minus the
<title>) and <body> are split into chunks. These can then be used by a
Decorator. Properties are also extracted from the HTML.
Page Properties
When the page is parsed, values from certain tags are added to the properties to allow easy access to them. The following tags have properties extracted from them.
- HTML Tag
All attributes of the<html>tag shall be added as properties. - TITLE Tag
The contents of the<title>tag shall be added as thetitleproperty. - META Tags
All the<meta>tags withnameandcontentattributes will be added with themetaprefix. - BODY Tag
All attributes of the<body>tag shall be added as properties with thebodyprefix.
Example
<xmp>
<html template="funky">
<head>
<title>My Funky Page</title>
<meta name="description" content="Description of my page.">
<meta name="author" content="Bob">
...
</head>
<body text="#ff00ff" bgcolor="green">
...
</body>
</html>
</xmp>
template=funky
title=My Funky Page
meta.description=Description of my page.
meta.author=Bob
body.text=#ff00ff
body.bgcolor=green
- Author:
- Joe Walnes
-
Method Summary
Modifier and TypeMethodDescriptiongetHead()Convenience method to return the contents of the<head>tag as a String.booleanCheck to see if this page contains an HTML frameset.voidsetFrameSet(boolean frameset) Marks this page as a frameset.voidWrite the contents of the<head>tag.Methods inherited from interface com.opensymphony.module.sitemesh.Page
addProperty, getBody, getBooleanProperty, getIntProperty, getLongProperty, getPage, getProperties, getProperty, getPropertyKeys, getRequest, getTitle, isPropertySet, setRequest, writeBody, writePage
-
Method Details
-
writeHead
Write the contents of the<head>tag.- Parameters:
out- the out- Throws:
IOException- Signals that an I/O exception has occurred.
-
getHead
String getHead()Convenience method to return the contents of the<head>tag as a String.- Returns:
- the head
- Since:
- 2.1.1
- See Also:
-
isFrameSet
boolean isFrameSet()Check to see if this page contains an HTML frameset.- Returns:
- true, if is frame set
-
setFrameSet
void setFrameSet(boolean frameset) Marks this page as a frameset.- Parameters:
frameset- the new frame set- Since:
- 2.3
- See Also:
-