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.

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

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.

link|improve this answer
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
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.