[javaee-spec users] Question related to https/secure connection

From: Christian Beikov <>
Date: Thu, 30 Aug 2012 21:22:22 +0200


I posted a question on stackoverflow regarding the retrieval of the
secure/https port of the server my application is running on and got the
answer that he thinks that this would be included in EE7 somehow.

Question on Stackoverflow

Is there a way to retrieve the https port of the EE6/Servlet Container
in a standard way? If not maybe a method to convert an URL in a standard
way to use https?

I know I could use a security constraint in web.xml, but the behavior is
not configurable at runtime as far as I know.

Maybe it is a bad idea to allow the user or admin to choose whether to
use https or not?