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 String
buildRedirectURL
(JspContext jspContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL that should be used for a redirect location.static String
buildRedirectURL
(PageContext pageContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL that should be used for a redirect location.static String
buildRedirectURL
(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 String
buildRedirectURL
(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 String
buildURL
(JspContext jspContext, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL.static String
buildURL
(PageContext pageContext, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL.static String
buildURL
(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 String
buildURL
(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String servletPath, String url, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Builds a URL.static void
sendRedirect
(int status, JspContext jspContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Sends a redirect.static void
sendRedirect
(int status, PageContext pageContext, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Sends a redirect.static void
sendRedirect
(int status, ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, String href, URIParameters params, AddLastModified addLastModified, boolean absolute, boolean canonical) Sends a redirect.static void
sendRedirect
(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 committedMalformedURLException
IOException
- 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 committedMalformedURLException
IOException
- 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 committedMalformedURLException
IOException
- 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 committedMalformedURLException
IOException
- See Also:
-