Java is client side, not server side. You require an ASP method of
encryption. I dont know what to suggest for you.
Java is not able AFAIK to change the URL, perhaps you could use JDBC and
insert the encryption to a database (via a PK such as a PID), then use
ASP to read it back. Other than that I dont know how to help.