public final class HttpLocation extends Object implements Location, Serializable
Modifier and Type | Method and Description |
---|---|
static HttpLocation |
build(javax.servlet.http.HttpServletRequest req)
Build a new instance from the specified servlet request.
|
String |
host() |
PathInfo |
info() |
String |
path() |
int |
port() |
String |
query() |
String |
scheme() |
static StringBuilder |
toBaseURL(javax.servlet.http.HttpServletRequest req)
Returns the a base URL as a string builder.
|
void |
toXML(org.pageseeder.xmlwriter.XMLWriter xml) |
public String scheme()
public String path()
public String query()
public void toXML(org.pageseeder.xmlwriter.XMLWriter xml) throws IOException
toXML
in interface org.pageseeder.xmlwriter.XMLWritable
IOException
public static HttpLocation build(javax.servlet.http.HttpServletRequest req)
req
- The servlet request to use.public static StringBuilder toBaseURL(javax.servlet.http.HttpServletRequest req)
This method contruct the base URL using the following methods:
getScheme
getServerName
getServerPort
The port number is only included if required.
req
- the HTTP servlet request to use to build the base URLCopyright © 2016 Allette Systems. All rights reserved.