简体   繁体   中英

Running Tomcat7 for https

When I changed https for secure connection in server.xml of tomcat 7.0

<Connector 
  clientAuth="false" port="8443" minSpareThreads="5" maxSpareThreads="75"
  enableLookups="true" disableUploadTimeout="true"
  acceptCount="100" maxThreads="200"
  scheme="https" secure="true" SSLEnabled="true"
  SSLCertificateFile="test.cer"
  SSLCertificateKeyFile="test.key" 
  SSLCACertificateFile="CertPath.txt"
  SSLVerifyClient="require" SSLEngine="on" SSLVerifyDepth="2" sslProtocol="TLS"
/>

I've an error when running tomcat from IDE

Caused by: java.io.FileNotFoundException: C:\\Documents and Settings\\User.keystore (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method)

but there is no error by running tomcat 7.0/bin/tomcat7.exe.

What wrong in these two? Please explain me! Thanks.

I think you need a .key-store file.

<Connector port=”443” maxHttpHeaderSize=”8192″
         maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″
         enableLookups=”false” disableUploadTimeout=”true”
         acceptCount=”100″ scheme=”https” secure=”true”
         **keystoreFile=”/home/Raja/Desktop/Tomcat5/mycert.jks”**
         clientAuth=”false” sslProtocol=”TLS>

check your server.xml file and also refer this link might be useful to you.

I think you need to create a new key store file and that you can generate by executing this command.

%JAVA_HOME%\\bin>keytool.exe -genkey -alias tomcat -keyalg RSA

and for more clarity see this link Tomcat SSL problems . I think this can help you to have better understanding of your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM