Generate CSR for Tomcat Server:

1. Generate the private key with the below command

keytool -genkey -alias website -keyalg RSA -keysize 2048 -keystore example_com.jks -dname "CN=example.com,OU=IT, O=Example Pvt Ltd, L=Hyderabad, ST=Telangana, C=IN"

2. Generate the CSR using the below command

keytool -certreq -alias website -file example_com.csr -keystore example_com.jks

3. Once the certificate is signed, you can install it with the below command

keytool -import -trustcacerts -alias server -file your_site_name.p7b -keystore your_site_name.jks