tree: a5319d11210893aafd56804b91979f34b3cc0243 [path history] [tgz]
  1. README.md
  2. pom.xml
  3. src/
fling/README.md

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/org.apache.sling.samples.fling.

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 mvn:org.apache.sling/org.apache.sling.launchpad.karaf-features/0.1.1-SNAPSHOT/xml/features
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 org.apache.sling.jcr.jackrabbit.usermanager or feature sling-jcr-jackrabbit-security to be installed