This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Ligthweight, embeddable servlet engine

 
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know of a simple, small servlet engine? Basically I'm trying to set up web based configuration.
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apache Tomcat seems to be the most simple to me. Orion is pretty simple as well.
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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 ]
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Frank Carver:
I'd certainly hope that with a a few hours work you could get the footprint well below 500K.


Quite a few things could be done with a few hours .
 
Bras cause cancer. And tiny ads:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!