public class ServerData extends Object
| Constructor and Description |
|---|
ServerData(javax.servlet.http.HttpServletRequest req)
A C'tor that takes a HTTP Request object and
builds the server data from its contents
|
ServerData(ServerData serverData)
Copy-Constructor
|
ServerData(String serverName,
int serverPort,
String serverScheme,
String scriptName,
String contextPath)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
generates a new Object with the same values as this one.
|
String |
getContextPath()
Get the context path.
|
void |
getHostUrl(StringBuilder url)
Appends the Host URL to the supplied StringBuilder.
|
String |
getScriptName()
Get the script name
|
String |
getServerName()
Get the name of the server.
|
int |
getServerPort()
Get the server port.
|
String |
getServerScheme()
Get the server scheme.
|
void |
setContextPath(String contextPath)
Set the context path.
|
void |
setScriptName(String scriptName)
Set the script name.
|
void |
setServerName(String serverName)
Sets the cached serverName.
|
void |
setServerPort(int serverPort)
Sets the cached serverPort.
|
void |
setServerScheme(String serverScheme)
Sets the cached serverScheme.
|
String |
toString()
Returns this object as an URL.
|
public ServerData(String serverName, int serverPort, String serverScheme, String scriptName, String contextPath)
serverName - The server name.serverPort - The server port.serverScheme - The server scheme.scriptName - The script name.contextPath - The context Pathpublic ServerData(ServerData serverData)
serverData - A ServerData Objectpublic ServerData(javax.servlet.http.HttpServletRequest req)
req - The HTTP Requestpublic String getServerName()
public void setServerName(String serverName)
serverName - the server name.public int getServerPort()
public void setServerPort(int serverPort)
serverPort - the server port.public String getServerScheme()
public void setServerScheme(String serverScheme)
serverScheme - the server scheme.public String getScriptName()
public void setScriptName(String scriptName)
scriptName - the script name.public String getContextPath()
public void setContextPath(String contextPath)
contextPath - A String.public void getHostUrl(StringBuilder url)
url - A StringBuilder objectCopyright © 2000–2018 The Apache Software Foundation. All rights reserved.