/** Append the supplied name/value pair to the end of the supplied URL, * after URLencoding name and value. * @param url the url to append * @param name the name of the parameter to append * @param value the value to append * @return the encoded url */ public static String appendAttribute(String url, String name, String value) { CharWrap togo = new CharWrap(url); int qpos = url.indexOf('?'); appendAttribute(togo, qpos == -1, name, value); return togo.toString(); }
Object attrval = rawstate.params.get(attrname); if (attrval instanceof String) { URLUtil.appendAttribute(togo, isfirst, attrname, (String) attrval); isfirst = false; String[] vals = (String[]) attrval; for (int j = 0; j < vals.length; ++j) { URLUtil.appendAttribute(togo, isfirst, attrname, vals[j]); isfirst = false;