It went something like this:
I constructed the string and tried to escape it with a "\". Of course, I quickly realized that it was illegal. There are only a few things that work with that escape character.
Then I tried the '& amp;' thing. That didn't work.
Then I tried the '% 26' thing. That didn't work.
I imported the URLEncoder and fed the string into that. It didn't work.
I tried using the URI constructor with the 5 input elements. I have more than 5 inputs and it kept throwing a path exception. Nothing seemed to work.
I tried most things and they didn't work.
What finally worked was the \u0026 thing.
In the JSP the URL looks like this:
String url = "www.mydomain.com/login.aspx?name=Username\u0026Password=password\u0026accountNo=AcctNo";
Hope this helps somebody.