Class RedirectUtils


  • public class RedirectUtils
    extends Object
    Utility class for redirection.
    Author:
    avasquez
    • Constructor Detail

      • RedirectUtils

        public RedirectUtils()
    • Method Detail

      • redirect

        public static void redirect​(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    String url)
                             throws IOException
        Redirects to the specified URL. If the URL starts with '/', the request context path is added.
        Parameters:
        request - the request
        response - the response
        url - the URL to redirect to
        Throws:
        IOException