Saturday, July 22, 2017

Hosting Secure Servlets: Jetty

This post is part of a series about the hosting secure servlets (that is, using HTTPS).  I hope to do 1 post a day on this topic. The resulting posts will become the basis a talk that I am scheduled to give on August 10 at the Denver/Boulder Cybersecurity Meetup.

Jetty

  • Define properties
  • Register servlets
  • Start Jetty
I had to choose something as a servlet container and I chose Jetty.  Jetty has been around since 1995, so it has been around for a while. "Recently" (2009) it became part of the Eclipse project hence its URL.

Jetty has a reputation for being a good server for embedded applications, and at the time I didn't envision a separate project for the Miranda web stuff, so Jetty seemed like a natural choice.  Before that I was going to use Netty for all my web and servlet stuff.  But I became disenchanted with Netty when I ran into an SSL problem.

Before you can use Jetty to host servlets, you have to define a couple of properties.  Then you have to define a handler.  The documentation says that you can add and remove servlets after starting the server but I have not found this to be true so I recommend registering servlets before starting the server.  Starting Jetty involves 1 method call and is no big deal.


No comments:

Post a Comment

Miranda Release Date Now 3/31/2018

Due too the flu and a new job, Miranda has been delayed yet again.