simple.page
Interface Page


public interface Page

The Page object is used to define the interface to a compile page object. This contract must be fulfilled by all pages compiled by the server. If the content type is specified within the JSP source then the content type and charset will be set.

Author:
Niall Gallagher
See Also:
BasicPage

Method Summary
 java.lang.String getCharset()
          This is used to provide the character encoding that will be used when the page is marshalled to a byte stream.
 java.lang.String getContentType()
          This is used to provide a MIME content type, which can be used by the HTTP service to the the Content-Type header.
 void write(java.io.PrintWriter out, Model model)
          This is used to write the contents of the JSP page to the writer provided.
 

Method Detail

write

void write(java.io.PrintWriter out,
           Model model)
           throws java.lang.Exception
This is used to write the contents of the JSP page to the writer provided. This method is implemented by the translator from the text and code provided by the JSP. The model contains all data passed from the HTTP service to the page.

Parameters:
out - this is the writer used to output the page contents
model - this contains all attributes passed into the page
Throws:
java.lang.Exception

getContentType

java.lang.String getContentType()
This is used to provide a MIME content type, which can be used by the HTTP service to the the Content-Type header. This will allow the JSP to determine how the pages is presented.

Returns:
this returns the MIME type and charset for the page

getCharset

java.lang.String getCharset()
This is used to provide the character encoding that will be used when the page is marshalled to a byte stream. Typically this will be UTF-8 however it can be overridden by the JSP source.

Returns:
this returns the chatacter encoding for the page