Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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.

share|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
Does not work under glassfish 3.0.1: CLI001 Invalid Command: create-protocol-filter Command create-protocol-filter failed. – altmas5 May 29 '13 at 19:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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