tree: 46336e30a202aa07702d60d671fb6e85d94733d6 [path history] [tgz]
  1. src/
  2. pom.xml

Sling Fling Sample

This is a sample using Sling Models, Sling Query and Sling Scripting Thymeleaf.

Additional features used in this sample:

There are two profiles to install this sample with Maven Sling Plugin into a running local Sling instance for convenience:

When using Sling Launchpad listening on port 8080 with default admin credentials run:

mvn clean install -P launchpad@localhost

When using Apache Karaf with Sling Karaf Launchpad listening on port 8181 with default admin credentials run:

mvn clean install -P karaf@localhost

This will install initial content under /apps/fling, /content/fling and /etc/i18n/

Browse to http://localhost:8080/fling.html or http://localhost:8181/fling.html.

To install the required bundles/features on Apache Karaf run the commands below:

karaf@root()> feature:repo-add
karaf@root()> feature:install sling-launchpad-oak-tar
karaf@root()> feature:install sling-extension-models
karaf@root()> feature:install sling-extension-query
karaf@root()> feature:install sling-scripting-thymeleaf
karaf@root()> feature:install sling-auth-form²

For a more detailed user profile add some properties to an user³:

curl -u admin -FfirstName=Foo -FlastName=Bar http://localhost:8181/system/userManager/user/admin.update.json
  1. Pages under Authentication (/fling/auth) need authentication.
  2. optional feature
  3. requires bundle or feature sling-jcr-jackrabbit-security to be installed