code: public static String getPath(final String url, final Map<String, String> parameters,
  			final boolean javascript) {
  		// Have we already got some parameters?
  		int index = url.indexOf('?');
  		boolean hasVars = false;
  
  		if (index != -1) {
  			hasVars = true;
  		}
  
  		StringBuffer vars = new StringBuffer();
  
  		if (parameters != null) {
  			for (Map.Entry<String, String> entry : parameters.entrySet()) {
  				String key = entry.getKey();
  				String value = entry.getValue();
  
  				if (javascript) {
  					appendGetParamForJavascript(key, value, vars, hasVars);
  				} else {
  					appendGetParam(key, value, vars, hasVars);
  				}
  
  				hasVars = true;
  			}
  		}
  
  		return url + vars.toString();
  	}
docs: Adds GET parameters to a path.
  
  @param url the existing url path
  @param parameters are put into the URL as get parameters.
  @param javascript true if the URL is intended for use within a javascript function
  @return the complete url eg http://localhost/app?step=1