Ssl – Redirecting from http to https in Glassfish 3

glassfishredirectssl

How do you redirect port 80 -> 443 in Glassfish 3? My scenario is a web application SSL, and I want non-SSL requests to be automatically redirected.

Best Answer

You should look at this blog post on port unification in Glassfish 3. I believe it answers your question for you:

Granted, this solution offers a 302 redirect from only the protocol (e.g. http://blah:8000 to https://blah:8000) as opposed to a direct that changes the protocol and port, but is nifty nonetheless.