java - Show encoded url on web browser address bar -
i want show encoded url on web browser address bar when corresponding url going. aleady url , encoded using given code.
string geturl=request.getrequesturl().tostring(); out.println(geturl); string output = urlencoder.encode(geturl); out.println(output);
you have encode individual query string parameter name and/or value.
string url = "http://mysite.com/query?q=" + urlencoder.encode("bla bla", "iso-8859-1"); // or "utf-8".
Comments
Post a Comment