URISyntaxException Illegal character in query
You should not encode the whole URL because the URI class requires a valid protocol. Encode only the parameters
String params = URLEncoder.encode("Type=A Type&Name=1100110&Char=!", "UTF-8");
myUrl = "http://www.example.com/engine/myProcessor.jsp?" + params;
It's because of the whitespace here ...jsp?Type=A Type&...
, you can replace it with +
http://www.example.com/engine/myProcessor.jsp?Type=A+Type&Name=1100110&Char=!"