Unfiltered-based webapp template

25 views
Skip to first unread message

Anton Moiseev

unread,
Jan 4, 2015, 5:42:14 PM1/4/15
to unfilter...@googlegroups.com
Hello,

I have created Unfiltered-based web application project template here: https://github.com/1i7/snippets/tree/master/scala-web/ScalaUnfilteredWebappDemo

It 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.jar

Live 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/ScalaUnfilteredBasicDemo

Even more simple AJAX demo: https://github.com/1i7/snippets/tree/master/scala-web/ScalaUnfilteredAjaxDemo

A bit more details here (in Russian):
http://1i7.livejournal.com/41249.html
http://1i7.livejournal.com/40505.html
http://1i7.livejournal.com/40863.html
http://1i7.livejournal.com/41173.html

Reply all
Reply to author
Forward
0 new messages