First you need to configure HTTPS one-way or two-way links
Reference:
tomcat7.0.55 Configuring one-way and two-way HTTPS connections (two)
Then edit the Web. XML under Tomcat's CONF directory
Add after <welcome-file-list> end tag
<Login-config> <!--Authorization setting for SSL - <Auth-method>Client-cert</Auth-method> <Realm-name>Client Cert users-only Area</Realm-name> </Login-config> <Security-constraint> <!--Authorization setting for SSL - <web-resource-collection> <Web-resource-name>Ssl</Web-resource-name> <Url-pattern>/*</Url-pattern> </web-resource-collection> <User-data-constraint> <Transport-guarantee>Confidential</Transport-guarantee> </User-data-constraint> </Security-constraint>
As shown
Then reboot Tomcat and open it in a browser
http://localhost:8080
The address bar can see the https://localhost:8443/instructions successfully configured
tomcat7.0.55 Configuring HTTP Force jump to HTTPS