A Sample application for Apache Sling
This project demonstrates core concepts and features of the Apache Sling™ web framework. It provides a demonstrative mini-CMS application for the beautiful responsive directive template set by http://html5up.net. The application was created as part of an article about Sling featured in the German Java Magazin.
What this sample application is
This application demonstrates how resources in the JCR can be created and modified using REST. It shows how Sling's view mechanism can be leveraged to generate different representations of the same resource. It showcases a more advanced programmatic JCR ACL setup to allow content creation by anonymous users. Furthermore, it is demonstrate how JCR observation allows handling of resource modification events using the Sling Job framework.
What this sample application is not
A ready-to-use CMS / web application. It has purely been designed to demonstrate Sling features.
How to run this application
- Download the Sling 7 Standalone Application from the official download page
- Run the standalone jar using JDK 7 - this will install and start sling, e.g. with debugging on port 30303 using
java.exe -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=30303 -Xmx1700m -XX:MaxPermSize=256m -jar
. Handy hint: Tail the error.log in sling/logs - this is the best way to see what is happening under the hood. - Clone this repo and run
mvn install sling:install
- this will install the application to a sling instance at localhost:8080 - Open http://localhost:8080/javamagazin.html.
- You may login with any sling user, e.g. using admin/admin for the default administrative account.