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