This is a sample using Sling Models, Sling Query and Sling Scripting Thymeleaf.
Additional features used in this sample:
org.apache.sling.samples.fling.internal.Activator
Sling-Bundle-Resources
in pom.xml
Sling-Initial-Content
in pom.xml
maven-sling-plugin
in pom.xml
Run mvn clean install -P localhost
in this directory to install the sample with Maven Sling Plugin into a running local Sling instance listening on port 8181
.
This will install initial content under /apps/fling
, /content/fling
and /etc/i18n/org.apache.sling.samples.fling
.
Browse to 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-jackrabbit 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
/fling/auth
) need authentication.org.apache.sling.jcr.jackrabbit.usermanager
or feature sling-jcr-jackrabbit-security
to be installed