How to configure Jetty on HTTPS

This is the simplest way to configure SSL on Jetty. I will demonstrate this using a self-signed certificate which is created using “keytool” utility shipped with JDK or JRE.


1. Jetty should be installed.  

To configure Jetty web server on HTTPS follow below mentioned steps in this blog:

 Step 1:

Create a self-signed certificate using keytool.

keytool -genkey -keyalg RSA -keystore jetty.crt -storepass password -alias jetty -keypass password -validity 3650

Step 2:

Move jetty.crt file to {Jetty_Home} i.e. {install_root}\jetty-6.1.20

Step 3:

Edit jetty.xml located at {install_root}\jetty-6.1.20\etc and add below given block:













Step 4:

Save jetty.xml.

Step 5:

Restart Jetty web server.

Step 6:

Try to access URL:  https://localhost:8443

And then, you are good to go.


Author: Nimit Sharma

Hey I am Nimit Sharma, Working as a Lead Software Engineer. I am willing to learn new concepts and technologies. All content here are my personal views and not those of my employer.

One thought on “How to configure Jetty on HTTPS”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s