Hello,
I have created Unfiltered-based web application project template here:
https://github.com/1i7/snippets/tree/master/scala-web/ScalaUnfilteredWebappDemoIt can serve simple static html pages, static html with AJAX (with http-requests for plain-text), css files and images. All resources (html, css and images) are placed inside single JAR file, containing the whole web application (they are loaded from classpath, so one can unpack them outside for more perfomance if required). I would also like to add Unfiltered-Scalate and Unfiltered-Json examples in the same app, but currently they are not there due to some Unfiltered module versions problems in Maven repositories.
I have tried to make the example as simple as possible, so it does not contain any extra functionality, only demonstration of listed techniques. I have been trying to find something like this earlier, but failed, so hope this now helps to someone else.
The example project builds with Maven (optionally inside Netbeans) to single executable JAR file, containing the whole web application, that can be run like:
java -jar scala-unfiltered-webapp-demo-1.0-SNAPSHOT.jarLive demo here:
http://webdemo.lasto4ka.su/Two more examples:
Simple experiments with manual serving different types of resources with Unfiltered (plain text, html file from resources, inline html, css, png and jpeg images from resources):
https://github.com/1i7/snippets/tree/master/scala-web/ScalaUnfilteredBasicDemoEven more simple AJAX demo:
https://github.com/1i7/snippets/tree/master/scala-web/ScalaUnfilteredAjaxDemoA bit more details here (in Russian):
http://1i7.livejournal.com/41249.htmlhttp://1i7.livejournal.com/40505.htmlhttp://1i7.livejournal.com/40863.htmlhttp://1i7.livejournal.com/41173.html