Package 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("import") @ValidScope("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$ $Date$
- Author:
- Marino A. Jonsson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.velocity.tools.view.ImportSupport
ImportSupport.ImportResponseWrapper, ImportSupport.SafeClosingHttpURLConnectionReader
-
-
Field Summary
-
Fields inherited from class org.apache.velocity.tools.view.ImportSupport
application, DEFAULT_ENCODING, LOG, request, response, VALID_SCHEME_CHARS
-
-
Constructor Summary
Constructors Constructor Description ImportTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringread(Object obj)Returns the supplied URL rendered as a String.-
Methods inherited from class org.apache.velocity.tools.view.ImportSupport
acquireReader, acquireString, getContentTypeAttribute, isAbsoluteUrl, setLog, setRequest, setResponse, setServletContext, stripSession
-
-