I want to read the protocol the user is on. HTTP or HTTPS and build my url for site 2 on that page accordingly.
Step 1: Read the url user is on site 1 //Could be anything http or https
Step 2: Prefix the protocol for site 2 on that site 1 page according. HTTP or HTTPS as per step 1
FF handles it good. But IE doesn’t allow navigation from HTTPS site to HTTP site.
<a href="protocol://site2.com/">Click here for site 2</a>
I did it with
String scheme = request.getScheme();in my JSP