org.apache.turbine.services.jsp
Interface JspService

All Superinterfaces:
Initable, Service
All Known Implementing Classes:
TurbineJspService

public interface JspService
extends Service

Implementations of the JspService interface.

Version:
$Id: JspService.java 534527 2007-05-02 16:10:59Z tv $
Author:
John D. McNally

Field Summary
static int BUFFER_SIZE_DEFAULT
          Default Value for Jsp Page Buffer Size
static java.lang.String BUFFER_SIZE_KEY
          Property for Jsp Page Buffer Size
static java.lang.String JSP_EXTENSION
          The default extension of JSPs
static java.lang.String LINK
          The key used to store an instance of JspLink in the request
static java.lang.String RUNDATA
          The key used to store an instance of RunData in the request
static java.lang.String SERVICE_NAME
          The name used to specify this service in Turbine.properties
static java.lang.String TEMPLATE_PATH_KEY
          Property key for Template Pathes
 
Method Summary
 void addDefaultObjects(RunData data)
          Adds some convenience objects to the request.
 int getDefaultBufferSize()
          Returns the default buffer size of the JspService
 java.lang.String getRelativeTemplateName(java.lang.String template)
          Searchs for a template in the default.template path[s] and returns the template name with a relative path which is required by javax.servlet.RequestDispatcher
 void handleRequest(RunData data, java.lang.String templateName)
          executes the JSP given by templateName.
 void handleRequest(RunData data, java.lang.String templateName, boolean isForward)
          executes the JSP given by templateName.
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The name used to specify this service in Turbine.properties

See Also:
Constant Field Values

RUNDATA

public static final java.lang.String RUNDATA
The key used to store an instance of RunData in the request

See Also:
Constant Field Values

LINK

public static final java.lang.String LINK
The key used to store an instance of JspLink in the request

See Also:
Constant Field Values

JSP_EXTENSION

public static final java.lang.String JSP_EXTENSION
The default extension of JSPs

See Also:
Constant Field Values

TEMPLATE_PATH_KEY

public static final java.lang.String TEMPLATE_PATH_KEY
Property key for Template Pathes

See Also:
Constant Field Values

BUFFER_SIZE_KEY

public static final java.lang.String BUFFER_SIZE_KEY
Property for Jsp Page Buffer Size

See Also:
Constant Field Values

BUFFER_SIZE_DEFAULT

public static final int BUFFER_SIZE_DEFAULT
Default Value for Jsp Page Buffer Size

See Also:
Constant Field Values
Method Detail

addDefaultObjects

public void addDefaultObjects(RunData data)
Adds some convenience objects to the request. For example an instance of JspLink which can be used to generate links to other templates.

Parameters:
data - the turbine rundata object

handleRequest

public void handleRequest(RunData data,
                          java.lang.String templateName,
                          boolean isForward)
                   throws TurbineException
executes the JSP given by templateName.

Parameters:
data - A RunData Object
templateName - The template to execute
isForward - whether to perform a forward or include.
Throws:
TurbineException - If a problem occured while executing the JSP

handleRequest

public void handleRequest(RunData data,
                          java.lang.String templateName)
                   throws TurbineException
executes the JSP given by templateName.

Parameters:
data - A RunData Object
templateName - The template to execute
Throws:
TurbineException - If a problem occured while executing the JSP

getDefaultBufferSize

public int getDefaultBufferSize()
Returns the default buffer size of the JspService

Returns:
The default buffer size.

getRelativeTemplateName

public java.lang.String getRelativeTemplateName(java.lang.String template)
Searchs for a template in the default.template path[s] and returns the template name with a relative path which is required by javax.servlet.RequestDispatcher

Parameters:
template - The name of the template to search for.
Returns:
the template with a relative path


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.