org.apache.turbine.util.template
Class TemplateLinkWithSlash

java.lang.Object
  |
  +--org.apache.turbine.util.DynamicURI
        |
        +--org.apache.turbine.util.template.TemplateLink
              |
              +--org.apache.turbine.util.template.TemplateLinkWithSlash
All Implemented Interfaces:
ApplicationTool

public class TemplateLinkWithSlash
extends TemplateLink

This class allows one to specify paths in the setPage method using '/' slash as opposed to the ',' used in TemplateLink. It is less efficient as the '/' are converted to ',' to avoid problems parsing the pathinfo after conversion in a web server. It is recommended that projects standardize on using the ',' separator and use TemplateLink. But this class is available for those who do not mind the inefficiency.

Version:
$Id: TemplateLinkWithSlash.java,v 1.1.1.1 2001/08/16 05:10:01 jvanzyl Exp $
Author:
John D. McNally

Fields inherited from class org.apache.turbine.util.template.TemplateLink
template, TEMPLATE_KEY
 
Fields inherited from class org.apache.turbine.util.DynamicURI
data, hasPathInfo, hasQueryData, HTTP, HTTPS, PATH_INFO, pathInfo, QUERY_DATA, queryData, redirect, res, scriptName, sd, serverName, serverPort, serverScheme
 
Constructor Summary
TemplateLinkWithSlash()
          Default constructor
TemplateLinkWithSlash(RunData data)
          Constructor.
 
Method Summary
 TemplateLink setPage(java.lang.String t)
          Sets the template variable used by the Template Service.
 
Methods inherited from class org.apache.turbine.util.template.TemplateLink
getPage, getURI, init, refresh, setEncodeURLOff, toString
 
Methods inherited from class org.apache.turbine.util.DynamicURI
add, add, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, getA, getScriptName, getServerData, getServerName, getServerPort, getServerScheme, init, init, init, remove, removePathInfo, removePathInfo, removeQueryData, removeQueryData, renderPathInfo, renderQueryString, setAction, setScreen, setScriptName, setSecure, setSecure, setServerData, setServerName, setServerPort, setServerScheme, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

TemplateLinkWithSlash

public TemplateLinkWithSlash()
Default constructor

The init method must be called before use.


TemplateLinkWithSlash

public TemplateLinkWithSlash(RunData data)
Constructor.
Parameters:
data - a Turbine RunData object.
Method Detail

setPage

public TemplateLink setPage(java.lang.String t)
Sets the template variable used by the Template Service. This method allows slashes '/' as the path separator.
Overrides:
setPage in class TemplateLink
Parameters:
t - A String with the template name.
Returns:
A TemplateLink.


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