Class Util
- java.lang.Object
- 
- org.apache.jasper.tagplugins.jstl.Util
 
- 
 public class Util extends java.lang.ObjectUtil contains some often used consts, static methods and embedded class to support the JSTL tag plugin.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classUtil.ImportResponseWrapperWraps responses to allow us to retrieve results as Strings.
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringDEFAULT_ENCODING
 - 
Constructor SummaryConstructors Constructor Description Util()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringescapeXml(char[] arrayBuffer, int length)static java.lang.StringescapeXml(java.lang.String buffer)Performs the following substring replacements (to facilitate output to XML/HTML pages): & -> & < -> < > -> > " -> " ' -> ' See also OutSupport.writeEscapedXml().static java.lang.StringgetContentTypeAttribute(java.lang.String input, java.lang.String name)Get the value associated with a content-type attribute.static intgetScope(java.lang.String scope)Converts the given string description of a scope to the corresponding PageContext constant.static booleanisAbsoluteUrl(java.lang.String url)Returnstrueif our current URL is absolute,falseotherwise.static java.lang.StringresolveUrl(java.lang.String url, java.lang.String context, PageContext pageContext)Utility methods taken from org.apache.taglibs.standard.tag.common.core.UrlSupportstatic java.lang.StringstripSession(java.lang.String url)Strips a servlet session ID fromurl.
 
- 
- 
- 
Field Detail- 
DEFAULT_ENCODINGpublic static final java.lang.String DEFAULT_ENCODING - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getScopepublic static int getScope(java.lang.String scope) Converts the given string description of a scope to the corresponding PageContext constant. The validity of the given scope has already been checked by the appropriate TLV.- Parameters:
- scope- String description of scope
- Returns:
- PageContext constant corresponding to given scope description taken from org.apache.taglibs.standard.tag.common.core.Util
 
 - 
isAbsoluteUrlpublic static boolean isAbsoluteUrl(java.lang.String url) Returnstrueif our current URL is absolute,falseotherwise. taken from org.apache.taglibs.standard.tag.common.core.ImportSupport- Parameters:
- url- The URL
- Returns:
- trueif the URL is absolute
 
 - 
getContentTypeAttributepublic static java.lang.String getContentTypeAttribute(java.lang.String input, java.lang.String name)Get the value associated with a content-type attribute. Syntax defined in RFC 2045, section 5.1. taken from org.apache.taglibs.standard.tag.common.core.Util- Parameters:
- input- The attribute string
- name- The attribute name
- Returns:
- the attribute value
 
 - 
stripSessionpublic static java.lang.String stripSession(java.lang.String url) Strips a servlet session ID fromurl. 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.ImportSupport- Parameters:
- url- The URL
- Returns:
- the URL without a user submitted session id parameter
 
 - 
escapeXmlpublic static java.lang.String escapeXml(java.lang.String buffer) Performs the following substring replacements (to facilitate output to XML/HTML pages): & -> & < -> < > -> > " -> " ' -> ' See also OutSupport.writeEscapedXml(). taken from org.apache.taglibs.standard.tag.common.core.Util- Parameters:
- buffer- Data to escape
- Returns:
- escaped data
 
 - 
escapeXmlpublic static java.lang.String escapeXml(char[] arrayBuffer, int length)
 - 
resolveUrlpublic static java.lang.String resolveUrl(java.lang.String url, java.lang.String context, PageContext pageContext) throws JspExceptionUtility methods taken from org.apache.taglibs.standard.tag.common.core.UrlSupport- Parameters:
- url- The URL
- context- The context
- pageContext- The page context
- Returns:
- the absolute URL
- Throws:
- JspException- If the URL doesn't start with '/'
 
 
- 
 
-