title: Lightweight Java web framework - specific requirements
body: <p>The first time I encountered e.g. Ruby's Sinatra framework or PHP's Zend Framework, I wondered if there is something adequate in Java, it all seems so bloated here. Although there are myriads of frameworks around, I have found none so far that I deemed perfect for the kind of architecture I would like to implement. </p>
  
  <p>I wanted to design a web application that would be heavy on the Javascript with most of the application logic implemented on the client, the Java back-end would more or less just serve as a data store or perform complex computations. </p>
  
  <p>I did look through related questions here but I couldn't find the perfect answer, each of the suggested solutions had a quirk that would not match the requirements.</p>
  
  <p>So this is what I am looking for, a open source framework with the following features:</p>
  
  <ul>
  <li>Convention over Configuration</li>
  <li>No XML configuration except for web.xml</li>
  <li>Pure Java (no Scala, no Groovy, ...)</li>
  <li>natural REST-style URLs such as /news/2011/july (no .do, no .jsp, ...)</li>
  <li>REST-aware</li>
  <li>it shouldn't force me to deploy on an application server (e.g. EJB should be optional)</li>
  <li>session support would be nice but not mandatory</li>
  <li>code generation as in Rails would be awesome but not mandatory</li>
  <li>minimum of dependencies, small in overall size</li>
  <li>MVC would be nice, but
  <ul>
  <li>I'd like to be able to choose the M part, choose the persistence libraries on my own (no bundling). </li>
  <li>No automatically generated code for the view, neither HTML, Javascript, nor CSS</li>
  <li>An integrated template language would be nice, but it should be minimalistic (simple control flow, access to template variables)</li>
  <li>Layout support (i.e. you are able to specify a common template for similar views)</li>
  <li>Free choice of Javascript framework for the views</li>
  </ul></li>
  </ul>
  
  <p>Basically this would mean an MVC framework that does the routing for me and offers template support for the views, but the rest is fully modular, no magic. Is there any minimalistic framework that would provide this (or at least is modular enough to be configured that way)? </p>