The command below creates a keystore (/tomcat/.keystore) and generates a key pair based certificate which will be stored in it...
(if the keystore already exists this will just add a new certificate to it)keytool -genkeypair -alias tomcat -keyalg RSA -keystore /tomcat/.keystore.p12 -storetype pkcs12
Add this stanza to /tomcat/latest/conf/server.xml...
<Connector
protocol="org.apache.coyote.http11.Http11NioProtocol"
port="8443"
scheme="https"
secure="true"
maxThreads="150"
SSLEnabled="true"
keystoreFile="/tomcat/.keystore.p12"
keystorePass="keyStorePassword"
keyAlias="tomcat"
clientAuth="false"
sslProtocol="TLS">
</Connector>
systemctl restart tomcat