|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.velocity.tools.view.ImportSupport
org.apache.velocity.tools.view.ImportTool
@DefaultKey(value="import") @ValidScope(value="request") public class ImportTool
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>
| 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 | |
|---|---|
ImportTool()
|
|
| Method Summary | |
|---|---|
java.lang.String |
read(java.lang.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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImportTool()
| Method Detail |
|---|
public java.lang.String read(java.lang.Object obj)
obj - the URL to import
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||