I want to use keystore to save a private key. I use this private key to encrypt datasource password. I generated myfile.keystore file with keytool and added the following configuration in Tomact server.xml file.
<Connector
protocol="HTTP/1.1"
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="myfile.keystore" keystorePass="password"
clientAuth="false" sslProtocol="TLS"/>
How can I read this private key to use in Java code?