public class Util extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Util.ImportResponseWrapper
Wraps responses to allow us to retrieve results as Strings.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ENCODING |
static int |
HIGHEST_SPECIAL |
static String |
VALID_SCHEME_CHAR |
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static String |
escapeXml(char[] arrayBuffer,
int length) |
static String |
escapeXml(String buffer)
Performs the following substring replacements
(to facilitate output to XML/HTML pages):
& -> &
< -> <
> -> >
" -> "
' -> '
See also OutSupport.writeEscapedXml().
|
static String |
getContentTypeAttribute(String input,
String name)
Get the value associated with a content-type attribute.
|
static int |
getScope(String scope)
Converts the given string description of a scope to the corresponding
PageContext constant.
|
static boolean |
isAbsoluteUrl(String url)
Returns
true if our current URL is absolute,
false otherwise. |
static String |
resolveUrl(String url,
String context,
PageContext pageContext)
Utility methods
taken from org.apache.taglibs.standard.tag.common.core.UrlSupport
|
static String |
stripSession(String url)
Strips a servlet session ID from
url . |
public static final String VALID_SCHEME_CHAR
public static final String DEFAULT_ENCODING
public static final int HIGHEST_SPECIAL
public static int getScope(String scope)
scope
- String description of scopepublic static boolean isAbsoluteUrl(String url)
true
if our current URL is absolute,
false
otherwise.
taken from org.apache.taglibs.standard.tag.common.core.ImportSupporturl
- The URLtrue
if the URL is absolutepublic static String getContentTypeAttribute(String input, String name)
input
- The attribute stringname
- The attribute namepublic static String stripSession(String url)
url
. The session ID
is encoded as a URL "path parameter" beginning with "jsessionid=".
We thus remove anything we find between ";jsessionid=" (inclusive)
and either EOS or a subsequent ';' (exclusive).
taken from org.apache.taglibs.standard.tag.common.core.ImportSupporturl
- The URLpublic static String escapeXml(String buffer)
buffer
- Data to escapepublic static String escapeXml(char[] arrayBuffer, int length)
public static String resolveUrl(String url, String context, PageContext pageContext) throws JspException
url
- The URLcontext
- The contextpageContext
- The page contextJspException
- If the URL doesn't start with '/'Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.