org.norther.tammi.spray.servlet
Class DefaultJSPEngine

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.config.DefaultConfigurable
          extended by org.norther.tammi.spray.engine.AbstractTemplateEngine<String,String>
              extended by org.norther.tammi.spray.servlet.DefaultForwardEngine
                  extended by org.norther.tammi.spray.servlet.DefaultJSPEngine
All Implemented Interfaces:
Serializable, EventListener, NotificationBroadcaster, NotificationEmitter, TraceListener, Manageable, MBeanDelegate, Refreshable, Startable, CacheClient<String,String>, Configurable, TemplateEngine, ForwardEngine, JSPEngine

public class DefaultJSPEngine
extends DefaultForwardEngine
implements JSPEngine

DefaultJSPEngine implements TemplateEngine for JSP templates.

Version:
$Id: DefaultJSPEngine.java,v 1.15 2009/09/28 15:08:27 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.norther.tammi.core.config.DefaultConfigurable
DefaultConfigurable.Modified
 
Field Summary
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.spray.servlet.ForwardEngine
CONTEXT_NAME_PROPERTY, FOLDER_PATHS_PROPERTY, FORWARDED_PROPERTY, TEMPLATE_KEY_PROPERTY
 
Constructor Summary
DefaultJSPEngine()
          Constructs a new engine.
 
Method Summary
protected  void dispatch(String path, TemplateContext context, ServletRequest request, ServletResponse response, Writer writer)
          Dispatches the specified template path.
 String getToolPrefix()
          Gets the prefix to be applied to tool attribute keys if the transfer tools option is set.
 boolean isContextTools()
          Gets the context tools option.
 void setContextTools(boolean option)
          Sets the context tools option.
 void setToolPrefix(String prefix)
          Sets the prefix to be applied to tool attribute keys if the tranfer tools option set.
 
Methods inherited from class org.norther.tammi.spray.servlet.DefaultForwardEngine
addFolderPath, addFolderPath, clearFolders, getContextName, getFolderPaths, getTemplateKey, isForwarded, postmanaged, process, removeFolderPath, setContextName, setFolderPaths, setForwarded, setTemplateKey, templateExists, unmanaged, validateConfiguration
 
Methods inherited from class org.norther.tammi.spray.engine.AbstractTemplateEngine
clearCached, evaluate, evaluate, evaluate, execute, execute, execute, expireCached, expireFraction, getCache, getDefaultEncoding, getRefreshed, getSharedCacheName, getTemplateEncoding, isCachingDisabled, isStarted, refresh, removeCache, resolveLocalizedTemplate, setCachingDisabled, setDefaultEncoding, setSharedCacheName, start, stop
 
Methods inherited from class org.norther.tammi.core.config.DefaultConfigurable
addProperty, addProperty, addPropertyFilePath, addPropertyFilePath, checkConfiguration, clearProperties, containsProperty, getConfigKey, getConfiguration, getModifiedState, getProperties, getProperty, getPropertyFilePath, getPropertyFilePaths, indexOfProperty, loadConfiguration, loadConfiguration, loadConfiguration, modified, propertyMap, propertyMap, removeProperty, removeProperty, removePropertyFilePath, setConfigKey, setModifiedState, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, setPropertyFilePaths, setPropertyFilePaths, storeProperties
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.spray.servlet.ForwardEngine
addFolderPath, addFolderPath, clearFolders, getContextName, getFolderPaths, getTemplateKey, isForwarded, removeFolderPath, setContextName, setFolderPaths, setForwarded, setTemplateKey
 
Methods inherited from interface org.norther.tammi.spray.engine.TemplateEngine
evaluate, evaluate, evaluate, execute, execute, execute, getDefaultEncoding, resolveLocalizedTemplate, setDefaultEncoding, templateExists
 
Methods inherited from interface org.norther.tammi.core.config.Configurable
addProperty, addProperty, addPropertyFilePath, addPropertyFilePath, clearProperties, containsProperty, getConfigKey, getProperties, getProperty, getPropertyFilePath, getPropertyFilePaths, indexOfProperty, propertyMap, propertyMap, removeProperty, removeProperty, removePropertyFilePath, setConfigKey, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, setPropertyFilePaths, setPropertyFilePaths, storeProperties
 
Methods inherited from interface org.norther.tammi.core.base.Startable
isStarted, start, stop
 
Methods inherited from interface org.norther.tammi.core.cache.CacheClient
clearCached, expireCached, expireFraction, getCache, getSharedCacheName, isCachingDisabled, removeCache, setCachingDisabled, setSharedCacheName
 
Methods inherited from interface org.norther.tammi.core.base.Refreshable
getRefreshed, refresh
 

Constructor Detail

DefaultJSPEngine

public DefaultJSPEngine()
Constructs a new engine.

Method Detail

isContextTools

public boolean isContextTools()
Description copied from interface: JSPEngine
Gets the context tools option.

Specified by:
isContextTools in interface JSPEngine
Returns:
true if the context tools option is set, otherwise false.

setContextTools

public void setContextTools(boolean option)
Description copied from interface: JSPEngine
Sets the context tools option. If set, the template context tools are included in the JSP request scope as request attributes.

Specified by:
setContextTools in interface JSPEngine
Parameters:
option - true to set the context tools option, otherwise false.

getToolPrefix

public String getToolPrefix()
Description copied from interface: JSPEngine
Gets the prefix to be applied to tool attribute keys if the transfer tools option is set.

Specified by:
getToolPrefix in interface JSPEngine
Returns:
return the tool prefix.

setToolPrefix

public void setToolPrefix(String prefix)
Description copied from interface: JSPEngine
Sets the prefix to be applied to tool attribute keys if the tranfer tools option set. The purpose of the prefix is to avoid collisions within the JSP request scope.

Specified by:
setToolPrefix in interface JSPEngine
Parameters:
prefix - tool prefix.

dispatch

protected void dispatch(String path,
                        TemplateContext context,
                        ServletRequest request,
                        ServletResponse response,
                        Writer writer)
                 throws IOException,
                        ServletException
Description copied from class: DefaultForwardEngine
Dispatches the specified template path.

Overrides:
dispatch in class DefaultForwardEngine
Parameters:
path - the resolved template path.
context - the template context.
request - the servlet request.
response - the servlet response.
writer - the content writer.
Throws:
IOException - on I/O errors.
ServletException - on servlet errors.


Copyright © 2004 The Norther Organization. All rights reserved.