Package com.aoapps.servlet.lastmodified
Class LastModifiedUtil
java.lang.Object
com.aoapps.servlet.lastmodified.LastModifiedUtil
Static utilities for managing last modified parameters in servlet/JSP/taglib environments.
- Author:
- AO Industries, Inc.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildRedirectURL(JspContext jspContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL that should be used for a redirect location.static StringbuildRedirectURL(PageContext pageContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL that should be used for a redirect location.static StringbuildRedirectURL(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL that should be used for a redirect location, with path resolved relative to the given request.static StringbuildRedirectURL(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String servletPath, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL that should be used for a redirect location.static StringbuildURL(JspContext jspContext, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL.static StringbuildURL(PageContext pageContext, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL.static StringbuildURL(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL with path resolved relative to the given request.static StringbuildURL(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String servletPath, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL.static voidsendRedirect(int status, JspContext jspContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Sends a redirect.static voidsendRedirect(int status, PageContext pageContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Sends a redirect.static voidsendRedirect(int status, ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Sends a redirect.static voidsendRedirect(int status, ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String servletPath, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Sends a redirect.
-
Method Details
-
buildRedirectURL
public static String buildRedirectURL(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String servletPath, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException Builds a URL that should be used for a redirect location.- Throws:
MalformedURLException- See Also:
-
buildRedirectURL
public static String buildRedirectURL(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException Builds a URL that should be used for a redirect location, with path resolved relative to the given request.- Throws:
MalformedURLException- See Also:
-
buildRedirectURL
public static String buildRedirectURL(PageContext pageContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException Builds a URL that should be used for a redirect location.- Throws:
MalformedURLException- See Also:
-
buildRedirectURL
public static String buildRedirectURL(JspContext jspContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException Builds a URL that should be used for a redirect location.- Throws:
MalformedURLException- See Also:
-
buildURL
public static String buildURL(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String servletPath, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException Builds a URL.- Throws:
MalformedURLException- See Also:
-
buildURL
public static String buildURL(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException Builds a URL with path resolved relative to the given request.- Throws:
MalformedURLException- See Also:
-
buildURL
public static String buildURL(PageContext pageContext, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException Builds a URL.- Throws:
MalformedURLException- See Also:
-
buildURL
public static String buildURL(JspContext jspContext, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException Builds a URL.- Throws:
MalformedURLException- See Also:
-
sendRedirect
public static void sendRedirect(int status, ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String servletPath, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException, IllegalStateException, IOException Sends a redirect.- Throws:
IllegalStateException- when the response is already committedMalformedURLExceptionIOException- See Also:
-
sendRedirect
public static void sendRedirect(int status, ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException, IllegalStateException, IOException Sends a redirect.- Throws:
IllegalStateException- when the response is already committedMalformedURLExceptionIOException- See Also:
-
sendRedirect
public static void sendRedirect(int status, PageContext pageContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException, IllegalStateException, IOException Sends a redirect.- Throws:
IllegalStateException- when the response is already committedMalformedURLExceptionIOException- See Also:
-
sendRedirect
public static void sendRedirect(int status, JspContext jspContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) throws MalformedURLException, IllegalStateException, IOException Sends a redirect.- Throws:
IllegalStateException- when the response is already committedMalformedURLExceptionIOException- See Also:
-
