Generating SSL Certificate Request (CSR) for Your Domain Using GlassFish Application Server

Author:Esadax
Updated:Mar 22, 2025

Introduction

Securing your website with an SSL certificate is essential for establishing trust with your visitors. In this guide, we'll walk you through the process of generating a Certificate Signing Request (CSR) using the GlassFish application server, which will be used to obtain your SSL certificate from Esadax.com.

Prerequisites

Before proceeding, ensure that:

  1. Java Development Kit (JDK) is installed on your system.
  2. GlassFish Application Server is installed and configured on your machine.

Step-by-Step Guide

1. Create a Keystore and Private Key

Open a terminal or command prompt and navigate to the directory where you want to create the keystore and private key files.

keytool -keystore mydomain.keystore -genkey -alias mydomain
  • mydomain.keystore: This is your keystore file that will contain your private key and certificate information.
  • mydomain: Replace this with your domain name (e.g., example.com).

After executing the command, you will be prompted to enter a password for the keystore. You can leave it empty by pressing Enter.

2. Generate the CSR

Now, use the keytool utility to generate the Certificate Signing Request (CSR) based on the keystore you just created.

keytool -certreq -keystore mydomain.keystore -alias mydomain -file mydomain.csr
  • mydomain.csr: This is your CSR file that will be submitted to Esadax.com for signing.
  • Replace mydomain with your actual domain name.

3. Submitting the CSR to Esadax.com

  1. Log in to your Esadax.com account.
  2. Navigate to the SSL/TLS section and select the domain for which you want to generate the certificate.
  3. Upload the generated mydomain.csr file.
  4. Follow the on-screen instructions to complete the SSL certificate request.

4. Completing the Certificate Activation

Once Esadax.com signs your CSR, they will provide you with the signed certificate in a text format enclosed within -----BEGIN CERTIFICATE REQUEST----- and -----END CERTIFICATE REQUEST----- tags.

Notes

  • Ensure that the domain name used in the keystore matches exactly with the domain name registered with Esadax.com.
  • If you are generating the CSR for a subdomain, ensure that it is specified correctly during the prompts.

Where to Find Your CSR

The generated mydomain.csr file will be located in the same directory where you executed the keytool -certreq command.

Troubleshooting

If you encounter any issues during this process:

  • Ensure that you are using the correct alias (mydomain) when running the commands.
  • Verify that the keystore file path is correct.
  • If you forgot your keystore password, you can use the following command to remove the alias and recreate the keystore:
keytool -delete -keystore mydomain.keystore -alias mydomain

Conclusion

By following these steps, you have successfully generated a CSR for your domain using GlassFish. Submitting this request to Esadax.com will allow you to obtain an SSL certificate and secure your website with HTTPS.

For further assistance, visit the Esadax.com Support Center or refer to the official GlassFish documentation.