开发者

Creating a web server / servlet container in Java - Standing on the shoulders of giants

开发者 https://www.devze.com 2023-02-17 15:17 出处:网络
First and foremost: I want to state that this is mostly a personal exercise.There are plenty of containers and servers out there (Tomcat, Jetty, Winstone) that satisfy the needs of the market.

First and foremost: I want to state that this is mostly a personal exercise. There are plenty of containers and servers out there (Tomcat, Jetty, Winstone) that satisfy the needs of the market.

The other day I came across the Akka project and, having had a lot of fun with Erlang in the past, decided that it would be really cool to use it to build a functional web server.

Then I started daydreaming. What if I could use modern frameworks and build, in a code golf way, a web server that almost completely "stood on the shoulders of giants"? That is to say: how much of other people's work could I manage to use.

Ideally t开发者_如何学Pythonhe requirements would resemble something like:

  • Fault tolerant, clusterable, distributed
  • Easy to configure
  • Supports HTTP, HTTPS, and AJP on configurable ports
  • Supports interface binding and multiple domains
  • Supports JSP, Jython, etc. through a pluggable interface
  • Supports modules that allow implementation of things like WebDAV, proxy, and URL rewrite

My biggest stumbling block at this juncture is how on earth do you use Jasper, Jetty, GlassFish or anything to interpret JSPs without worrying about all the other stuff, like networking, that they bring?

Any other suggestions for features would be highly awesome. I'm also investigating non-traditional configuration methods to see if there's anything out there that I like more than XML or properties files. For those of you who are familiar with Apache, sometimes you need a little scripting and sometimes you just need key/value pairs.

So, in any case, hit me up with your suggestions.


At least Tomcat has implemented its JSP engine as a module. It's not released separately and it might require some work to fully dis-couple it from the rest of the Tomcat code.

It's got a separate name (Jasper) and its own Howto. It's found in the org.apache.jasper package (and below).

0

精彩评论

暂无评论...
验证码 换一张
取 消