Class Util
java.lang.Object
org.apache.jasper.tagplugins.jstl.Util
Util contains some often used consts, static methods and embedded class
 to support the JSTL tag plugin.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classWraps responses to allow us to retrieve results as Strings.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringescapeXml(char[] arrayBuffer, int length) static StringPerforms the following substring replacements (to facilitate output to XML/HTML pages): & -> & < -> < > -> > " -> " ' -> ' See also OutSupport.writeEscapedXml().static StringgetContentTypeAttribute(String input, String name) Get the value associated with a content-type attribute.static intConverts the given string description of a scope to the corresponding PageContext constant.static booleanisAbsoluteUrl(String url) Returnstrueif our current URL is absolute,falseotherwise.static StringresolveUrl(String url, String context, PageContext pageContext) Utility methods taken from org.apache.taglibs.standard.tag.common.core.UrlSupport
- 
Field Details- 
DEFAULT_ENCODING- See Also:
 
 
- 
- 
Constructor Details- 
Utilpublic Util()
 
- 
- 
Method Details- 
getScopeConverts 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
 
- 
isAbsoluteUrlReturnstrueif 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
 
- 
getContentTypeAttributeGet 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
 
- 
escapeXmlPerforms 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
 
- 
escapeXml
- 
resolveUrlpublic static String resolveUrl(String url, String context, PageContext pageContext) throws JspException Utility 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 '/'
 
 
-