RSS RSS feed
November 21, 2009
Hot Topics:

Views from Abroad: Close Up On Jetty

  • April 24, 2001
  • By Benoît Marchal
  • Send Email »
  • More Articles »

I originally stumbled upon Jetty, an open source HTTP servlet server written in 100% Java from MortBay, in 1999 while looking for a small Web server to ship with a book. The most popular alternative at the time (Apache with Jakarta) was bulky and difficult to install.

Benoît Marchal

Recently, I had dinner with Greg Wilkins, the passionate developer of Jetty, near his office in London's Soho district ("from a base in London, you can go anywhere," explains Wilkins). The conversation provided fascinating insights into an original approach to Web server development.

Just a Protocol

"HTTP is a simple protocol that I want to put in my applications," explains Wilkins. However, most application servers require the applications surrender control and adopt the server configuration, logs, API and directory structure.

"Jetty is a component designed for embedding in other applications."

"It is a great model, if the application server provides all the services you need..." which Wilkins very much doubts. Indeed, from JSP to Cocoon through proprietary languages, "there are many ways to generate dynamic content. A given application server will only support a few, not enough to keep all the developers happy all the time."

In sharp contrast, Jetty is a component. It runs standalone but it was really designed for embedding in other applications. For example, it does not enforce a given directory structure. Of course, it also supports the full servlet API, including JSP.

Embeddable Server

Jetty dates back to 1995, when Wilkins entered a competition organized by Sun Australia (although he currently lives in London, Wilkins is an Aussie) with a Web-based "default tracking" application. Those were the dark ages of CGI, and since there was no servlet API, his application included a Web server. Wilkins eventually won the competition, thanks not to the default tracking app but to his Web server component.

Despite several rewritings, Jetty remains a component. "Everything required for embedding has been abstracted as an interface," explains Wilkins. "Furthermore, there are no undue dependencies between the modules," which means your application includes only those modules it needs.

Jetty is mostly popular with developers for intranets and demos, thanks to its small memory footprint, its ability to work "right out of the box," and its friendly design. It's not so popular with ISPs however. Says Wilkins, "It was really designed as a developer component and it lacks the management interface that is so important for the ISP market." Yet he is quick to point out that "an early 2000 benchmark found Jetty was the fastest Java server around. Of course, the competition has improved since, but so has Jetty."

A Developer's Best Friend

The most popular servlet engines, such as Tomcat and JRun, are great for hosted solutions. When it comes to packaging an application for download, a more flexible server is required. I have found that Jetty fills the bill perfectly. I'm sure you'll find other usages for this exciting Web server.

I am looking for more Java projects for future columns. I welcome commercial and open source projects alike. I am particularly interested in projects coming out of Asia. Please use the feedback form at marchal.com if you have suggestions.

About the Author

Benoît Marchal is a Belgian developer and writer. He is the author of XML by Example and Applied XML Solutions.

1




Networking Solutions





Partners

  • Partner With Us














More for Developers

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs