Couldn’t quite find the perfect java-based web stack

As I mentioned in this article, I wanted to find a nice lightweight java back-end that would:

  • Allow me to write a REST api on the java-side using as much of POJO as possible.
  • Be able to serve static HTML, CSS and JS files easily.
  • Be able to combine individual HTML, CSS and JS into a single file and serve them using unique MD5 file names so caching wouldn’t be an issue (this I didn’t mention in the earlier article).

At first I thought Apache Tapestry would do the job but now after deploying two apps I’ve decided against it. It mucks around too much with the front-end. You HAVE to serve static content under a specific folder, and you have no control over that. Yuck. It also forces you to put a bunch of their javascript on your html like Prototype.js. No, I don’t want that.

In the end I just built a framework using Jetty and Servlet 3.0. Of course, I made it do exactly what I want, but I feel my requirements are pretty common for today’s apps. I hope I can open-source it and put it on GitHub (and put it on the Maven repository as well). But that would require a bit of work so we’ll see!