Class SafeContentRedirect

  • Direct Known Subclasses:
    ServletSafeContentRedirect

    public abstract class SafeContentRedirect
    extends Object
    Centralizing the code which permits to redirect safely to any content URL.
    Author:
    Yohann Chastagnier
    • Method Detail

      • fromServlet

        public static ServletSafeContentRedirect fromServlet​(javax.servlet.http.HttpServletRequest request,
                                                             javax.servlet.http.HttpServletResponse response)
        Initializing the file response context.
        Parameters:
        request - the current request.
        response - the current response.
        Returns:
        the initialized file response.
      • getDestination

        public String getDestination​(String url)
        Sets the URL of redirection and perform on it some computing.
        Parameters:
        url - the URL to redirect to.