keytool -genkey -alias server -keyalg RSA -keysize 2048 -keystore www.domain.com.jks keytool -certreq -alias server -file csr.txt -keystore www.domain.com.jks cat csr.txt
When it asks for first and last name, this is NOT your first and last name, but rather it is your Fully Qualified Domain Name for the site you are securing (example: www.yourdomain.com). If you are ordering a Wildcard Certificate this must begin with the * character. (example: *.yourdomain.com)
After you have placed the CSR in the interssl account and the certificate has been validated and issued, you can import it into the keystore, e.g.
keytool -import -trustcacerts -alias server -file your_site_name.p7b -keystore your_site_name.jks
In case you didn't receive a .p7b file, you can also import the .ca-bundle and .crt files like this:
keytool -import -trustcacerts -keystore www.domain.com.jks -alias ca-bundle -file www_domain_com.ca-bundle keytool -import -trustcacerts -keystore www.domain.com.jks -alias server -file www_domain_com.crt
You may find further details please on the COMODO CSR generation page:
For GlassFish specific details please have a look at: