We have a java web application which is deployed in many different clients using Tomcat 7. One of our clients wants us to make SSL mandatory, so that https is enforced. The other deployments should remain with no SSL since they don't have SSL certificates.

We know how to enforce it via security-constraint tags in web.xml, but we'd like to avoid the hassle of having to make a special build to a single client, and would rather be able to set this as a database parameter which would be read by the application and then programmatically enforce SSL or not.

Is this possible? How do we do that?

Thanks a lot in advance.

Jonathas

---

UPDATE: what we need is that in this specific environment the application automatically redirects por 80 to port 443, disabling port 80 is not a viable option.