Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## echopointng.template
Class JspTemplateDataSource

    java.lang.Object
      echopointng.template.AbstractTemplateDataSource
          echopointng.template.JspTemplateDataSource

All Implemented Interfaces:
  TemplateDataSource, java.io.Serializable

    public class JspTemplateDataSource

extends AbstractTemplateDataSource

`JspTemplateDataSource` takes it template data from a JSP include path.

By default there is no caching of JSP template dtaa. This is because the JSP engines are excellent at deciding when JSP content needs recompiling.

Also since a Java class is compiled out of JSP content, then the speed at which they operate menas caching may not have a dramatic effect.

See Also:
  Serialized Form

Field Summary

Fields inherited from class echopointng.template.AbstractTemplateDataSource
`DEFAULT_ACCESS_TIMEOUT, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_TIME_TO_LIVE`

Constructor Summary
`JspTemplateDataSource()` Creates a `JspTemplateDataSource` with no JSP path.
`JspTemplateDataSource(java.lang.String jspPath)` Creates a `JspTemplateDataSource` that takes its template data from a JSP path

Method Summary
`java.lang.Object` | `getAttribute(java.lang.String name)` Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.
`java.lang.String[]` | `getAttributeNames()` Returns an array of String containing the names of the attributes available to this JSP request.
`java.lang.String` | `getCanonicalName()` Returns a canonical name of this `TemplateDataSource`.
`java.io.InputStream` | `getInputStream()` This always returns null because the InputStream of JSP data can only be obtained by the backend rendering engine.
`java.lang.String` | `getJspPath()`
`void` | `removeAttribute(java.lang.String name)` Removes an attribute.
`void` | `setAttribute(java.lang.String name, java.lang.Object javaBean)` Associates a Java bean with a specified name.
`void` | `setJspPath(java.lang.String jspPath)` Sets the JSP path to use for template data.

Methods inherited from class echopointng.template.AbstractTemplateDataSource
`getCachingHints, getCharacterEncoding, getContentType, setCachingHints, setCharacterEncoding, setContentType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JspTemplateDataSource

    public JspTemplateDataSource()

  Creates a `JspTemplateDataSource` with no JSP path.

### JspTemplateDataSource

    public JspTemplateDataSource(java.lang.String jspPath)

  Creates a `JspTemplateDataSource` that takes its template data from a JSP path

Method Detail

### getJspPath

    public java.lang.String getJspPath()

  Returns:
    Returns the JSP Path in use.

### setJspPath

    public void setJspPath(java.lang.String jspPath)

  Sets the JSP path to use for template data.

  Parameters:
    `jspPath` - - The newValue to set.

### getCanonicalName

    public java.lang.String getCanonicalName()

  Description copied from interface: `TemplateDataSource`
  Returns a canonical name of this `TemplateDataSource`.

  The name returned here is used to look up the parsing result of the internal caching, so it should differ for all different `TemplateDataSource` objects :-)

  May return `null` if this TemplateDataSource is supposed to be parsed each time. The canonical name would be something like a filename or an URL.

  Returns:
    a unique name of the `TemplateDataSource`
  See Also:
    `TemplateDataSource.getCanonicalName()`

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  This always returns null because the InputStream of JSP data can only be obtained by the backend rendering engine. It does this by exuting the JSP path and capturing the output data.

  Returns:
    a InputStream containing the template data
  Throws:
    `java.io.IOException`
  See Also:
    `TemplateDataSource.getInputStream()`

### getAttribute

    public java.lang.Object getAttribute(java.lang.String name)

  Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.

  Attribute names should follow the same conventions as package names. Names beginning with java.*, javax.*, and com.sun.*, are reserved for use by Sun Microsystems.

  Parameters:
    `name` - a `String` specifying the name of the attribute
  Returns:
    an Object containing the value of the attribute, or null if the attribute does not exist

### getAttributeNames

    public java.lang.String[] getAttributeNames()

  Returns an array of String containing the names of the attributes available to this JSP request. This method returns an zero length array if there are no attributes available to it.

  Returns:
    an array of String containing the names of the attributes

### setAttribute

    public void setAttribute(java.lang.String name,
                             java.lang.Object javaBean)

  Associates a Java bean with a specified name. This will be inserted into the ServletRequest (with Request scope) before the JSP is called

  Bean names should follow the same conventions as package names. Names beginning with java.*, javax.*, and com.sun.*, are reserved for use by Sun Microsystems.

  If the value passed in is null, the effect is the same as calling `removeAttribute(java.lang.String)`.

  Parameters:
    `name` - - the name to associated with the java Bean. This will become a Request scope attribute within the JSP.
    `javaBean` - - the object to be associated with the name

### removeAttribute

    public void removeAttribute(java.lang.String name)

  Removes an attribute.

  Attribute names should follow the same conventions as package names. Names beginning with java.*, javax.*, and com.sun.*, are reserved for use by Sun Microsystems.

  Parameters:
    `name` - - the name associated with the attribute value.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD