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.
Asked
Active
Viewed 8,174 times
1 Answers
1
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.
-
The solution seems to be for glassfish 3.1, while I'm using 3.0.1. It kind of seems to work anyways, though glassfish throws null pointer exceptions every time it redirects. On the other hand, glassfish always throws exception whatever you do.. – Rasmus Franke Jun 10 '11 at 13:02
-
Please always at least summarize answers here if you link off-site. Links go away, these answers get archived and freely distributed as a package with the questions. – Caleb Jun 10 '11 at 13:18
-
Does not work under glassfish 3.0.1: `CLI001 Invalid Command: create-protocol-filter Command create-protocol-filter failed.` – Jorge V. May 29 '13 at 19:11