Configuring HTTPS in Apache-tomcat-7.0.33-windows-x64.zip results in some problems when configuring SSL
1. Generate the private key and self-issued certificate with the Keytool from the JDK, as follows:
Keytool-genkey-alias Sdtx-keyalg Rsa-keystore D:/keys/sdtx.keystore
2. Enable Web server (TOMCAT) SSL, which is the HTTPS encryption protocol, ready for a clean tomcat, this tutorial uses the apache-tomcat-7.0.33-windows-x64 to open the Tomcat directory of conf/ Server.xml file, open comment code for lines 83 and 87, and set Keystorefile, keystorepass Modify the result as follows:
<ConnectorPort= "8443"Protocol= "Org.apache.coyote.http11.Http11Protocol"MaxThreads= "Max"sslenabled= "true"Scheme= "https"Secure= "true"ClientAuth= "false"Sslprotocol= "TLS"Keystorefile= "D:/test/sdtx.keystore"Keystorepass= "123456"/>
3. How to configure the Java Web program to use HTTPS
If you want your Java EE Web program to use the HTTPS protocol for SSL communication, you need to add the following in the Web. XML configuration file:
<Security-constraint> <web-resource-collection> <Web-resource-name>App</Web-resource-name> <Url-pattern>/*</Url-pattern> </web-resource-collection> <User-data-constraint> <Transport-guarantee>Confidential</Transport-guarantee> </User-data-constraint> </Security-constraint>
TOMCAT7 Configuring HTTPS security access