Search on the Internet, the content is not very perfect. Now to organize, to do a study note, for future use.
(1) access to the Bin directory under the JDK
(2) Enter the following instruction "Keytool-v-genkey-alias tomcat-keyalg rsa-keystore d:/tomcat.keystore"
The D:/tomcat.keystore is to place the generated tomcat.keystore in the D-packing directory. Note to put to the C disk, under the Win7 system, you need to enter the command line as an administrator, or you cannot create a tomcat.keystore. This example is placed under D disk.
How do I get to the command line as an administrator? Start-> the search box to enter cmd-> Wait (note not return)-> appears cmd.exe-> right button "Run as Administrator" can be.
(3) Enter KeyStore password
Password arbitrary, this 123456 for example, to remember this password, after the Server.xml configuration need to use.
(4) Enter the name, organizational unit, organization, city, province, country and other information
(5) A confirmation prompt will appear after the input
Enter Y at this time, and return. The completion KeyStore is created at this time.
Access to the D-packing directory to see the generated tomcat.xml
(6) Enter Tomcat's master password
You can enter directly and default to the same password as KeyStore.
After that, it shows that the storage is complete.
(7) Enter Tomcat folder
Find the Sever.xml in the Conf directory and edit it
All Connector annotations that begin with <connector port= "8443".
(8) Add code to load KeyStore in Sever.xml
Notice the KeyStore password in the box, which is the "123456" we set up just now.
Close and save Sever.xml when editing is complete.
(9) Start Tomcat.
If the following error occurs, "Keystore was tampered with,or password is incorrect", that is, the password for step (8) is wrong. Please check the password and rewrite the sever.xml.
(10) After the successful launch, use https://127.0.0.1:8443 access page
The page was successfully opened, i.e., the HTTPS configuration under Tomcat succeeded.