java.lang.Object
com.aoapps.taglib.UrlUtils
Helper utility for handling URLs.
- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getHref
(PageContext pageContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Gets an href attribute value with parameters.static String
getSrc
(PageContext pageContext, String src, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Gets a src attribute value with parameters.static void
writeHref
(JspContext jspContext, Appendable out, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) static void
writeHref
(PageContext pageContext, Appendable out, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Writes an href attribute with parameters.static void
writeSrc
(JspContext jspContext, Appendable out, String src, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) static void
writeSrc
(PageContext pageContext, Appendable out, String src, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Writes a src attribute with parameters.
-
Method Details
-
getHref
public static String getHref(PageContext pageContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws JspTagException, MalformedURLException Gets an href attribute value with parameters. Adds contextPath to URLs that begin with a slash (/). Encodes the URL.- Throws:
JspTagException
- when parameters provided with null hrefMalformedURLException
- See Also:
-
writeHref
public static void writeHref(PageContext pageContext, Appendable out, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws JspTagException, IOException Writes an href attribute with parameters. Adds contextPath to URLs that begin with a slash (/). Encodes the URL.- Throws:
JspTagException
- when parameters provided with null hrefIOException
- See Also:
-
writeHref
public static void writeHref(JspContext jspContext, Appendable out, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws JspTagException, IOException - Throws:
JspTagException
IOException
- See Also:
-
getSrc
public static String getSrc(PageContext pageContext, String src, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws JspTagException, MalformedURLException Gets a src attribute value with parameters. Adds contextPath to URLs that begin with a slash (/). Encodes the URL.- Throws:
JspTagException
- when parameters provided with null srcMalformedURLException
- See Also:
-
writeSrc
public static void writeSrc(PageContext pageContext, Appendable out, String src, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws JspTagException, IOException Writes a src attribute with parameters. Adds contextPath to URLs that begin with a slash (/). Encodes the URL.- Throws:
JspTagException
- when parameters provided with null srcIOException
- See Also:
-
writeSrc
public static void writeSrc(JspContext jspContext, Appendable out, String src, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws JspTagException, IOException - Throws:
JspTagException
IOException
- See Also:
-