Class ServletRequestUrlHelper


  • @PublicApi
    public final class ServletRequestUrlHelper
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String contentDispositionAttachment​(java.lang.String fileName)  
      static java.lang.String createUri​(java.lang.String path)  
      static java.lang.String createUri​(javax.servlet.http.HttpServletRequest req, java.lang.String path)  
      static java.lang.String getFullUrl()  
      static java.lang.String getFullUrl​(javax.servlet.http.HttpServletRequest req)  
      static java.lang.String getHost()  
      static java.lang.String getHost​(javax.servlet.http.HttpServletRequest req)  
      static com.google.common.net.HostAndPort getHostAndPort()  
      static com.google.common.net.HostAndPort getHostAndPort​(javax.servlet.http.HttpServletRequest req)  
      static java.lang.String getPath()  
      static java.lang.String getPath​(javax.servlet.http.HttpServletRequest req)  
      static int getPort()  
      static int getPort​(javax.servlet.http.HttpServletRequest req)  
      static java.lang.String getRemoteAddress​(javax.servlet.http.HttpServletRequest req)  
      static java.lang.String getScheme()  
      static java.lang.String getScheme​(javax.servlet.http.HttpServletRequest req)  
      static java.lang.String getServerUrl()  
      static java.lang.String getServerUrl​(javax.servlet.http.HttpServletRequest req)  
      static UriRewritingResult rewriteUri​(java.lang.String uri)  
      static UriRewritingResult rewriteUri​(javax.servlet.http.HttpServletRequest req, java.lang.String uri)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServletRequestUrlHelper

        public ServletRequestUrlHelper()
    • Method Detail

      • createUri

        public static java.lang.String createUri​(java.lang.String path)
      • createUri

        public static java.lang.String createUri​(javax.servlet.http.HttpServletRequest req,
                                                 java.lang.String path)
      • getScheme

        public static java.lang.String getScheme()
      • getScheme

        public static java.lang.String getScheme​(javax.servlet.http.HttpServletRequest req)
      • getHost

        public static java.lang.String getHost()
      • getHost

        public static java.lang.String getHost​(javax.servlet.http.HttpServletRequest req)
      • getPort

        public static int getPort()
      • getPort

        public static int getPort​(javax.servlet.http.HttpServletRequest req)
      • getHostAndPort

        public static com.google.common.net.HostAndPort getHostAndPort()
      • getHostAndPort

        public static com.google.common.net.HostAndPort getHostAndPort​(javax.servlet.http.HttpServletRequest req)
      • getRemoteAddress

        public static java.lang.String getRemoteAddress​(javax.servlet.http.HttpServletRequest req)
      • getPath

        public static java.lang.String getPath()
      • getPath

        public static java.lang.String getPath​(javax.servlet.http.HttpServletRequest req)
      • getServerUrl

        public static java.lang.String getServerUrl()
      • getServerUrl

        public static java.lang.String getServerUrl​(javax.servlet.http.HttpServletRequest req)
      • getFullUrl

        public static java.lang.String getFullUrl()
      • getFullUrl

        public static java.lang.String getFullUrl​(javax.servlet.http.HttpServletRequest req)
      • rewriteUri

        public static UriRewritingResult rewriteUri​(javax.servlet.http.HttpServletRequest req,
                                                    java.lang.String uri)
      • contentDispositionAttachment

        public static java.lang.String contentDispositionAttachment​(java.lang.String fileName)