Package com.enonic.xp.web.servlet
Class ServletRequestUrlHelper
- java.lang.Object
-
- com.enonic.xp.web.servlet.ServletRequestUrlHelper
-
@PublicApi public final class ServletRequestUrlHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description ServletRequestUrlHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
contentDispositionAttachment(String fileName)
static String
createUri(String path)
static String
createUri(javax.servlet.http.HttpServletRequest req, String path)
static String
getFullUrl()
static String
getFullUrl(javax.servlet.http.HttpServletRequest req)
static String
getHost()
static String
getHost(javax.servlet.http.HttpServletRequest req)
static HostAndPort
getHostAndPort()
static HostAndPort
getHostAndPort(javax.servlet.http.HttpServletRequest req)
static String
getPath()
static String
getPath(javax.servlet.http.HttpServletRequest req)
static int
getPort()
static int
getPort(javax.servlet.http.HttpServletRequest req)
static String
getRemoteAddress(javax.servlet.http.HttpServletRequest req)
static String
getScheme()
static String
getScheme(javax.servlet.http.HttpServletRequest req)
static String
getServerUrl()
static String
getServerUrl(javax.servlet.http.HttpServletRequest req)
static UriRewritingResult
rewriteUri(String uri)
static UriRewritingResult
rewriteUri(javax.servlet.http.HttpServletRequest req, String uri)
-
-
-
Method Detail
-
getScheme
public static String getScheme()
-
getScheme
public static String getScheme(javax.servlet.http.HttpServletRequest req)
-
getHost
public static String getHost()
-
getHost
public static 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 HostAndPort getHostAndPort()
-
getHostAndPort
public static HostAndPort getHostAndPort(javax.servlet.http.HttpServletRequest req)
-
getRemoteAddress
public static String getRemoteAddress(javax.servlet.http.HttpServletRequest req)
-
getPath
public static String getPath()
-
getPath
public static String getPath(javax.servlet.http.HttpServletRequest req)
-
getServerUrl
public static String getServerUrl()
-
getServerUrl
public static String getServerUrl(javax.servlet.http.HttpServletRequest req)
-
getFullUrl
public static String getFullUrl()
-
getFullUrl
public static String getFullUrl(javax.servlet.http.HttpServletRequest req)
-
rewriteUri
public static UriRewritingResult rewriteUri(String uri)
-
rewriteUri
public static UriRewritingResult rewriteUri(javax.servlet.http.HttpServletRequest req, String uri)
-
-