Apache Tomcat seems to be the most simple to me You're joking, right? Tomcat is one of a breed of "full fat" servlet containers which offer all sorts of features you probably don't need in a lightweight, embeddable system. To decide how small you can use, first look hard at what features you really need. Can you live without web-applications and other API2.3 features? Can you live without JSP? If you don't need those two, then you also probably don't need any XML parsing. Do you need to interface with another web server, or are you happy to serve static pages with the same servlet engine. Do you need sessions and servlet lifecycle events as introduced in API2.2 ? If all you need is to serve static resources and basic servlets, at relatively low throughput, there are plenty of smaller (or more modular) servlet containers which make much more sense embedded. I suggest you look at Jetty ( http://jetty.mortbay.org/jetty/ ) and GNU Paperclips ( http://www.gnu.org/software/paperclips/ ) to start with. If even those are too complicated, I wrote a Servlet API1.0 server in about 1000 lines of code a few years ago which we might be able to come to an arrangement about.
Originally posted by Frank Carver: You're joking, right? Tomcat is one of a breed of "full fat" servlet containers which offer all sorts of features you probably don't need in a lightweight, embeddable system.
I didn't pay as much attention to the subject as I probably should have. As far as ease of use goes, I think that Tomcat is very simple. Throw your servlets in the appropriate folders and your good to go. You don't need to mess with the tomcat configuration file unless you get into more complex issues with the container.
posted 17 years ago
decide how small you can use, first look hard at what features you really need
All I really need is something that abstracts away HTTP. The most basic, bare-bones implementation should suffice. I prefer to avoid deprecated code, though. Here's my thought process: The options for runtime administration of a server are basically either a web-based interface or a GUI. I'm not much of a GUI programmer, so... I'm just going to use Jetty for now. It'll cost me 0.5 megs, but it gets the job done. Paperclips doesn't make me feel warm and fuzzy (it has all the signs of being completely abandoned). Maybe I'll be able to hack in JMX someday for more generic administration. Thanks for the suggestions. [ October 28, 2002: Message edited by: David Weitzman ]
posted 17 years ago
I'm just going to use Jetty for now. It'll cost me 0.5 megs, but it gets the job done. I like Jetty, and have used it in one form or another several times, over the years. It's very modular, so you can easily strip out the bits you don't need. I'd certainly hope that with a a few hours work you could get the footprint well below 500K. Paperclips doesn't make me feel warm and fuzzy (it has all the signs of being completely abandoned). I guess this is true. I tried to get hold of it to use a while ago, and ended up having to contact the author (Nic Ferrier) directly. He's active on the advanced-servlets mailing list, and obviously still working on the Paperclips code, but he's rubbish at updating his web site and releasing code.