Month: August 2011

Enabling SSL in JBoss Server

Difference between HTTP and HTTPS

Both HTTP and HTTPS are protocols used for client-server communication. The difference being that, in case of HTTPS, the communication between the client( usually a web browser ) and server ( usually a web server ) is done in an encrypted fromat. This is achieved by using SSL.

Find more about SSL here : SSL Guide for Openfire

Enabling SSL in JBoss App Server

To enable HTTPS or SSL connection in JBoss, one needs to create a keystore which will contain Self Signed Certificates that the JBoss server will use to communicate with the client. Use the following java command to create the keystore.

keytool -genkey -alias tomcat -keyalg RSA -keystore NAME_OF_KEYSTORE -validity NUMBER_OF_DAYS

Example : keytool -genkey -alias tomcat -keyalg RSA -keystore JBoss_KS_Arun -validity 60

This will create a keystore in the name JBoss_KS_Arun. Copy this to the jboss/server/default/conf/ directory in JBoss. Then modify the server.xml as follows

 <Connector port=”8443″ protocol=”HTTP/1.1″ SSLEnabled=”true”
maxThreads=”150″ scheme=”https” secure=”true”

Now try hitting the server @ https://localhost:8443. You should be able to see the JBoss welcome screen. 🙂 🙂

The other option to Self Signed Certificates is to use certificates from Certification Authorities ( CA ) like verisign. To find the difference both, use this link


The Nonsense Logger