com.fullspan.util
Class HttpUtil

java.lang.Object
  extended bycom.fullspan.util.HttpUtil

public class HttpUtil
extends java.lang.Object

Author:
Mitch Stuart

Method Summary
static java.lang.String addQueryString(java.lang.String url, java.lang.String queryString)
          Appends a query string to a URL.
static java.lang.String makeWebAppURL(java.lang.String scheme, java.lang.String serverName, int serverPort, java.lang.String contextPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addQueryString

public static java.lang.String addQueryString(java.lang.String url,
                                              java.lang.String queryString)
Appends a query string to a URL. The input URL may or may not have a query string already. This is detected by looking for a '?' character in the input URL. If the input URL has a query string already, the input query string is appended using the '&' delimiter. If not, the input query string is appended using the '?' delimiter.

Parameters:
url - the current URL, which may or may not have a query string
queryString - the query string to be appended
Returns:
the URL with the query string appended

makeWebAppURL

public static java.lang.String makeWebAppURL(java.lang.String scheme,
                                             java.lang.String serverName,
                                             int serverPort,
                                             java.lang.String contextPath)