URI Parameter Encoding

To encode the URI or a part of it is not always as easy as it seems. The standard Java library has a the java.net.URLEncoder class which helps a lot on the encoding part.

URLEncoder.encode(value, "UTF-8");