org.apache.velocity.tools.view
Class ImportTool
java.lang.Object
org.apache.velocity.tools.view.ImportSupport
org.apache.velocity.tools.view.ImportTool
- Direct Known Subclasses:
- ImportTool
@DefaultKey(value="import")
@ValidScope(value="request")
public class ImportTool
- extends ImportSupport
General-purpose text-importing view tool for templates.
Usage:
Just call $import.read("http://www.foo.com/bleh.jsp?sneh=bar") to insert the contents of the named
resource into the template.
Toolbox configuration:
<tools>
<toolbox scope="request">
<tool class="org.apache.velocity.tools.view.ImportTool"/>
</toolbox>
</tools>
- Since:
- VelocityTools 2.0
- Version:
- $Revision: 961796 $ $Date: 2010-07-08 17:18:15 +0200 (jeu., 08 juil. 2010) $
- Author:
- Marino A. Jonsson
|
Method Summary |
String |
read(Object obj)
Returns the supplied URL rendered as a String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImportTool
public ImportTool()
read
public String read(Object obj)
- Returns the supplied URL rendered as a String.
- Parameters:
obj - the URL to import
- Returns:
- the URL as a string
Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.