@DefaultKey(value="import") @ValidScope(value="request") public class ImportTool extends ImportSupport
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>
ImportSupport.ImportResponseWrapper, ImportSupport.SafeClosingHttpURLConnectionReaderapplication, DEFAULT_ENCODING, LOG, request, response, VALID_SCHEME_CHARS| Constructor and Description |
|---|
ImportTool() |
| Modifier and Type | Method and Description |
|---|---|
String |
read(Object obj)
Returns the supplied URL rendered as a String.
|
acquireReader, acquireString, getContentTypeAttribute, isAbsoluteUrl, setLog, setRequest, setResponse, setServletContext, stripSessionCopyright © 2002–2023 Apache Software Foundation. All rights reserved.