|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.velocity.tools.view.ImportSupport
public abstract class ImportSupport
Provides methods to import arbitrary local or remote resources as strings.
Based on ImportSupport from the JSTL taglib by Shawn Bayern
Nested Class Summary | |
---|---|
protected class |
ImportSupport.ImportResponseWrapper
Wraps responses to allow us to retrieve results as Strings. |
protected static class |
ImportSupport.SafeClosingHttpURLConnectionReader
|
Field Summary | |
---|---|
protected javax.servlet.ServletContext |
application
|
protected static java.lang.String |
DEFAULT_ENCODING
Default character encoding for response. |
protected static org.apache.commons.logging.Log |
LOG
|
protected javax.servlet.http.HttpServletRequest |
request
|
protected javax.servlet.http.HttpServletResponse |
response
|
protected static java.lang.String |
VALID_SCHEME_CHARS
|
Constructor Summary | |
---|---|
ImportSupport()
|
Method Summary | |
---|---|
protected java.io.Reader |
acquireReader(java.lang.String url)
|
protected java.lang.String |
acquireString(java.lang.String url)
|
static java.lang.String |
getContentTypeAttribute(java.lang.String input,
java.lang.String name)
Get the value associated with a content-type attribute. |
static boolean |
isAbsoluteUrl(java.lang.String url)
Returns true if our current URL is absolute, false otherwise. |
static java.lang.String |
stripSession(java.lang.String url)
Strips a servlet session ID from url. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log LOG
protected javax.servlet.ServletContext application
protected javax.servlet.http.HttpServletRequest request
protected javax.servlet.http.HttpServletResponse response
protected static final java.lang.String VALID_SCHEME_CHARS
protected static final java.lang.String DEFAULT_ENCODING
Constructor Detail |
---|
public ImportSupport()
Method Detail |
---|
protected java.lang.String acquireString(java.lang.String url) throws java.io.IOException, java.lang.Exception
url
- the URL resource to return as string
java.io.IOException
java.lang.Exception
protected java.io.Reader acquireReader(java.lang.String url) throws java.io.IOException, java.lang.Exception
url
- the URL to read
java.io.IOException
java.lang.Exception
public static boolean isAbsoluteUrl(java.lang.String url)
url
- the url to check out
public static java.lang.String stripSession(java.lang.String url)
url
- the url to strip the session id from
public static java.lang.String getContentTypeAttribute(java.lang.String input, java.lang.String name)
input
- the string containing the attributesname
- the name of the content-type attribute
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |