simple.page
Class BasicPage

java.lang.Object
  extended by simple.page.BasicPage

public abstract class BasicPage
extends java.lang.Object

The BasicPage object provides the base class for all generated page objects. The translator uses this object as the base if no object has been specificed in the extends JSP directive. If another base class is to be used, it should extend this.

Author:
Niall Gallagher

Field Summary
protected  Context context
          This provides a context to the underlying OS file system.
protected  java.lang.String path
          The path that the translated JSP source was created from.
protected  java.lang.String type
          This is the MIME type specified by the page implementation.
 
Constructor Summary
BasicPage(Context context, java.lang.String path)
          Constructor for the BasicPage object.
 
Method Summary
 java.lang.String getCharset()
          This retrieves the character encoding that should be used when marshalling the character stream provided by the page to a byte stream.
 java.lang.String getContentType()
          This provides the MIME content type and character encoding of for the page implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected Context context
This provides a context to the underlying OS file system.


type

protected java.lang.String type
This is the MIME type specified by the page implementation.


path

protected java.lang.String path
The path that the translated JSP source was created from.

Constructor Detail

BasicPage

public BasicPage(Context context,
                 java.lang.String path)
Constructor for the BasicPage object. This is used to create an object that represents a translated JSP source. This requires the file system context and the .jsp path.

Parameters:
context - this is the file system context for the page
path - this is the URI path reference to the JSP source
Method Detail

getCharset

public java.lang.String getCharset()
This retrieves the character encoding that should be used when marshalling the character stream provided by the page to a byte stream. Typically UTF-8 will satisfy most needs.

Returns:
this returns the page character encoding

getContentType

public java.lang.String getContentType()
This provides the MIME content type and character encoding of for the page implementation. This can be used to set the HTTP Content-Type header used for a request displaying the page.

Returns:
this returns the content type and charset