I would like to add a link to a secure page of my application on one of my insecure pages. The tomcat secure port is configured in the server.xml file. In some deployments, these are 443, 8443, etc. So I need a way to read a secure port from tomcat configuration in order to use it in a link. Is it possible?
Alternatively, simply accessing the server.xml configuration (from the request context) and disassembling it yourself to find out the port number is also acceptable, but less desirable.
I understand that there can be several connectors and several safe ones, so I will leave this in my program logic to decide which one to choose. The problem is, how do I get this information?
Thanks!
source
share