The Velocity Project < Tools - View >

Velocity Tools

VelocityView

VelocityView Tools

Other Subprojects

ImportTool Reference Documentation
       

General-purpose text-importing view tool for templates.

Class
 org.apache.velocity.tools.view.tools.ImportTool
Name
 $import (this is the recommended name of the tool in the Velocity context)
Toolbox Configuration Example
 
<tool>
  <key>import</key>
  <scope>request</scope>
  <class>org.apache.velocity.tools.view.tools.ImportTool</class>
</tool>
Author(s)
  Marino A. Jonsson
Method Overview
read() Returns the supplied URL rendered as a String.
See Also
The Javadoc for more info.
read()
       

Returns the supplied URL rendered as a String.

String read(String url)

Parameters
url
The URL to import.
Returns
The supplied URL rendered as a String.

This method takes an arbitrary URL or URI and renders it as a String. This tool can also be used to import local .vm resources without sharing the current velocity-context (as opposed to the #parse directive).

$import.read("http://velocity.apache.org/tools/devel/")
$import.read("/wookie.jsp")


Copyright © 1999-2003, Apache Software Foundation