It is very common these days to have a website load all of its content via AJAX and use the HTML5 History.pushState() method to control the URL and the browser back button. This is done manually or through some kind of JavaScript MVC framework (AngularJS with $locationProvider.html5Mode(true), or Backbone.Router with {pushState: true}). In order for these techniques to function properly after the page is refreshed, the server must redirect requests for non-existent files to index.html silently (return the content of index.html immediately without a redirect header).

This can be achieved easily enough in Apache2 with mod_rewrite, but what about in Apache Tomcat 7? That turned out to be incredibly difficult to do without writing a special Java servlet dedicated to static files, but many StackOverflow searches later I have come up with a recipe.