You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2017/06/19 12:41:45 UTC

[39/53] sling-site git commit: asf-site branch created for published content

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/getting-started.html
----------------------------------------------------------------------
diff --git a/documentation/getting-started.html b/documentation/getting-started.html
new file mode 100644
index 0000000..7eb4952
--- /dev/null
+++ b/documentation/getting-started.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Getting Started</h1></header><p>We're on the way to update the documentation to make it more easy to get in touch with Sling. At the moment we can give you the following starting points:</p>
+<p>{% for label, page in children %}* [{{ page.headers.title }}]({{ page.path }}) {% endfor %}</p>
+<h2>Where to head from here</h2>
+<p>We recommend you read through following topics to get as fast as possible into Sling:</p>
+<ul>
+  <li><a href="/documentation/development/getting-and-building-sling.html">Getting and building Sling</a></li>
+  <li><a href="/documentation/the-sling-engine/architecture.html">Architecture</a></li>
+  <li><a href="/documentation/the-sling-engine/dispatching-requests.html">Dispatching Requests</a></li>
+  <li><a href="/documentation/the-sling-engine/resources.html">Resources</a></li>
+  <li><a href="/documentation/development/ide-tooling.html">{{ refs.ide-tooling.headers.title }}</a></li>
+  <li><a href="/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html">Manipulating Content - The SlingPostServlet (servlets.post)</a></li>
+  <li><a href="/documentation/the-sling-engine/request-parameters.html">Request Parameters</a></li>
+  <li><a href="/documentation/the-sling-engine/authentication.html">Authentication</a></li>
+  <li>[Eventing and Jobs]({{ refs.eventing-and-jobs.path }})</li>
+</ul></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/getting-started/discover-sling-in-15-minutes.html
----------------------------------------------------------------------
diff --git a/documentation/getting-started/discover-sling-in-15-minutes.html b/documentation/getting-started/discover-sling-in-15-minutes.html
new file mode 100644
index 0000000..a8adb75
--- /dev/null
+++ b/documentation/getting-started/discover-sling-in-15-minutes.html
@@ -0,0 +1,129 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Discover Sling in 15 minutes</h1></header><p>The Sling Launchpad is a ready-to-run Sling configuration, providing an embedded JCR content repository and web server, a selection of Sling components, documentation and examples. The Launchpad makes it easy to get started with Sling and to develop script-based applications.</p>
+<p>This page will help you get started with the Launchpad. Fifteen minutes should be enough to get an overview of what Sling does.</p>
+<p>While simple to run and understand, the Launchpad is a full-featured instance of Sling, an example configuration that we have created with the most common modules and configurations. The full functionality of Sling is available by loading additional Sling (or custom) OSGi bundles as needed, using the Launchpad's web-based OSGi management console.</p>
+<p>[TOC]</p>
+<h2>See Also</h2>
+<p>More Sling samples can be found under <a href="http://svn.apache.org/repos/asf/sling/trunk/samples/">http://svn.apache.org/repos/asf/sling/trunk/samples/</a></p>
+<p>Once you grok the basic examples of this page, we recommend studying the <em>slingbucks</em> and <em>espblog</em> samples. Both have README files with more info.</p>
+<h2>Prerequisites</h2>
+<p>We'll start with the self-runnable jar from the Sling distribution, you only need a Java 7 JDK. Download the latest release from the Sling <a href="/downloads.cgi">Downloads</a> page or by clicking this link: <a href="http://www.apache.org/dyn/closer.lua/sling/org.apache.sling.launchpad-8.jar">org.apache.sling.launchpad-8.jar</a>. Alternatively you can deploy the <a href="http://www.apache.org/dyn/closer.lua/sling/org.apache.sling.launchpad-8-webapp.war">Sling Web application</a> into any decent Servlet Container such as Jetty or Tomcat or you can <a href="/documentation/development/getting-and-building-sling.html">build the current source yourself</a>.</p>
+<p>To show the simplicity of the REST-style approach taken by Sling the examples below will be using <a href="http://curl.haxx.se/">cURL</a>. Any HTTP client would do, but cURL is the easiest to document in a reproducible way.</p>
+<p>A WebDAV client makes editing server-side scripts much more convenient, but to make our examples easy to reproduce, we're using cURL below to create and update files in the JCR repository, via the Sling WebDAV server.</p>
+<h2>Start the Launchpad</h2>
+<p>After downloading the Sling Launchpad self-runnable jar just start it as follows:</p>
+<p>$ java -jar org.apache.sling.launchpad-8.jar</p>
+<p>This starts the Sling embedded Web Server on port 8080 and writes application files into the <code>sling</code> folder found in the current working directory.</p>
+<p>Once started, look at <a href="http://localhost:8080/system/console/bundles">http://localhost:8080/system/console/bundles</a> with your browser. Use <em>admin</em> with password <em>admin</em> if Sling asks you for a login. Sling then displays the <em>Felix Web Management Console</em> page.</p>
+<p>On the bundles page, all bundles should be marked <em>Active</em>. They're all <a href="http://www.osgi.org/">OSGi</a> bundles powered by <a href="http://felix.apache.org">Apache Felix</a>, but that doesn't really matter to us right now.</p>
+<p><em>Log files: If things go wrong, have a look at the <code>sling/logs/error.log</code> log file - that's where Sling writes any error messages.</em></p>
+<h2>Create some content</h2>
+<p>Until we have ready-to-test forms, you can create content with cURL, or you can create an HTML form that posts to the specified URL.</p>
+<p>To create a content node (nodes are a <a href="http://jackrabbit.apache.org/">JCR</a> concept, a unit of storage) with cURL, use:</p>
+<p>curl -u admin:admin -F"sling:resourceType=foo/bar" -F"title=some title" http://localhost:8080/content/mynode</p>
+<p>The resulting node can be seen at <a href="http://localhost:8080/content/mynode.html.path">http://localhost:8080/content/mynode.html</a>, or as json format under <a href="http://localhost:8080/content/mynode.json">http://localhost:8080/content/mynode.json</a>. Lets try with cURL:</p>
+<p>$ curl http://localhost:8080/content/mynode.json</p>
+<p>This returns the properties of the <code>/content/mynode</code> in JSON format as we have created it above.</p>
+<p>{"title":"some title","sling:resourceType":"foo/bar","jcr:primaryType":"nt:unstructured"}</p>
+<p>The additional property <code>jcr:primaryType</code> is a special JCR property added by the content repository, indicating the JCR primary node type.</p>
+<p><em>Monitoring requests: Sling provides a simple tool (an OSGi console plugin) to monitor HTTP requests, which helps understand how things work internally. See the <a href="/documentation/development/monitoring-requests.html">Monitoring Requests</a> page for details.</em></p>
+<h2>Render your content using server-side javascript (ESP)</h2>
+<p>Sling uses scripts or servlets to render and process content.</p>
+<p>Several scripting languages are available as additional Sling modules (packaged as OSGi <em>bundles</em> that can be installed via the Sling management console), but the launchpad currently includes the ESP (server-side ECMAscript), JSP (Java Server Pages), and Groovy language modules by default.</p>
+<p>To select a script, Sling uses the node's <em>sling:resourceType</em> property, if it is set.</p>
+<p>That is the case in our example, so the following script will be used by Sling to render the node in HTML, if the script is found at <em>/apps/foo/bar/html.esp</em> in the repository.</p>
+<html>
+<body>
+<h1><%= currentNode.title %></h1>
+</body>
+</html>
+<p>To select the script, Sling:</p>
+<ul>
+  <li>looks under <em>/apps</em></li>
+  <li>and appends the <em>sling:resourceType</em> value of our node ( which is <em>foo/bar</em> )</li>
+  <li>and appends <em>html.esp</em>, as the extension of our URL is <em>html</em> and the language of our script is <em>esp</em>.</li>
+</ul>
+<p>Store this script under <em>/apps/foo/bar/html.esp</em>, either using a WebDAV client (connected to <a href="http://admin:admin@localhost:8080/">http://admin:admin@localhost:8080/</a>), or using cURL as shown here, after creating the <em>html.esp</em> script in the current directory on your system:</p>
+<p>curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo/bar</p>
+<p>create a local file <em>html.esp</em> and copy above content.</p>
+<p>curl -u admin:admin -T html.esp http://localhost:8080/apps/foo/bar/html.esp</p>
+<p>The HTML rendering of your node, at <a href="http://localhost:8080/content/mynode.html">http://localhost:8080/content/mynode.html</a>, is now created by this ESP script. You should see the node's title alone as an &lt;h1&gt; element in that page.</p>
+<p>A script named <em>POST.esp</em> instead of <em>html.esp</em> would be called for a POST request, <em>DELETE.esp</em> for DELETE, <em>xml.esp</em> for a GET request with a <em>.xml</em> extension, etc. See <a href="/documentation/the-sling-engine/url-to-script-resolution.html">URL to Script Resolution</a> on the Sling wiki for more info.</p>
+<p>Servlets can also be easily "wired" to handle specific resource types, extensions, etc., in the simplest case by using SCR annotations in the servlet source code. Servlets and scripts are interchangeable when it comes to processing Sling requests.</p>
+<h2>What next?</h2>
+<p>These simple examples show how Sling uses scripts to work with JCR data, based on <em>sling:resourceType</em> or node types.</p>
+<p>There's much more to Sling of course - you'll find some additional simple examples below, as well as above in the <em>see also</em> section.</p>
+<h2>Additional examples</h2>
+<h3>Let Sling generate the path of a newly created node.</h3>
+<p>To create a node with a unique path at a given location, end the URL of the POST request with <em>/</em>.</p>
+<p>In this case, the Sling response redirects to the URL of the created node.</p>
+<p>Start by creating a new <em>/blog</em> folder:</p>
+<p>curl -X POST -u admin:admin "http://localhost:8080/content/blog"</p>
+<p>And create a node with a Sling-generated name under it:</p>
+<p>curl -D - -u admin:admin -F"title=Adventures with Sling" "http://localhost:8080/content/blog/"</p>
+<p>Using cURL's <em>-D</em> option shows the full HTTP response, which includes a <em>Location</em> header to indicate where the new node was created:</p>
+<p>Location: /blog/adventures_with_slin</p>
+<p>The actual node name might not be <em>adventures_with_slin</em> - depending on existing content in your repository, Sling will find a unique name for this new node, based on several well-know property values like title, description, etc. which are used for this if provided.</p>
+<p>So, in our case, our new node can be displayed in HTML via the <a href="http://localhost:8080/blog/adventures*with*slin.html">http://localhost:8080/blog/adventures_with_slin.html</a> URL.</p>
+<p>Note that we didn't set a <em>sling:resourceType</em> property on our node, so if you want to render that node with a script, you'll have to store the script under <em>/apps/nt/unstructured/html.esp</em>.</p>
+<h3>Add a page header with sling.include</h3>
+<p>The <em>sling.include</em> function can be called from scripts to include the rendered result of another node.</p>
+<p>In this example, we create a node at <em>/content/header</em>, rendered with a logo using an <em>html.esp</em> script, then use that header at the top of the <em>html.esp</em> script that we created previously for the <em>foo/bar</em> resource type.</p>
+<p>Start by checking that <a href="http://localhost:8080/content/mynode.html">http://localhost:8080/content/mynode.html</a> is rendered using the <em>html.esp</em> script created above.</p>
+<p>Create this script and name it <em>header.esp</em>:</p>
+<div>
+<p style="color:blue;">
+<img src="/images/sling.jpg" align="right"/>
+<%= currentNode.headline %>
+</p>
+</div>
+<p>Upload it so that it is used to render resources having <em>sling:resourceType=foo/header</em>:</p>
+<p>curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo/header/ curl -u admin:admin -T header.esp http://localhost:8080/apps/foo/header/html.esp</p>
+<p>Create the header node:</p>
+<p>curl -u admin:admin -F"sling:resourceType=foo/header" -F"headline=Hello, Sling world" http://localhost:8080/content/header</p>
+<p>Upload the logo that the script uses (using sling.jpg or another logo in the current directory):</p>
+<p>curl -X MKCOL -u admin:admin http://localhost:8080/images/ curl -u admin:admin -T sling.jpg http://localhost:8080/images/sling.jpg</p>
+<p>And check that the header is rendered with the logo at <a href="http://localhost:8080/content/header.html">http://localhost:8080/content/header.html</a>.</p>
+<p>Now, update the html.esp script that we created for our first example above, to include the header:</p>
+<html>
+<body>
+<div id="header">
+<% sling.include("/content/header"); %>
+</div>
+<h1><%= currentNode.title %></h1>
+</body>
+</html>
+<p>And upload it again to replace the previous version:</p>
+<p>curl -u admin:admin -T html.esp http://localhost:8080/apps/foo/bar/html.esp</p>
+<p>The <a href="http://localhost:8080/content/mynode.html">http://localhost:8080/content/mynode.html</a>, once refreshed, now shows the blue headline and logo, and this layout also applies to any node created with <em>sling:resourceType=foo/bar</em>.</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/legacy/logging.html
----------------------------------------------------------------------
diff --git a/documentation/legacy/logging.html b/documentation/legacy/logging.html
new file mode 100644
index 0000000..fea005c
--- /dev/null
+++ b/documentation/legacy/logging.html
@@ -0,0 +1,211 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Logging</h1></header><div class="note">
+This document is for 3.x release of Sling Commons Log components. Refer to
+<a href="http://sling.apache.org/documentation/development/logging.html">Logging</a> for documentation related
+to newer version.
+</div>
+<h2>Introduction</h2>
+<p>Logging in Sling is supported by the <code>org.apache.sling.commons.log</code> bundle, which is one of the first bundles installed and started by the Sling Launcher. The <code>org.apache.sling.commons.log</code> bundle has the following tasks:</p>
+<ul>
+  <li>Implements the OSGi Log Service Specification and registers the <code>LogService</code> and <code>LogReader</code> services</li>
+  <li>Exports three commonly used logging APIs:</li>
+  <li><a href="http://www.slf4j.org">Simple Logging Facade for Java (SLF4J)</a></li>
+  <li><a href="http://jakarta.apache.org/commons/logging">Apache Commons Logging</a></li>
+  <li><a href="http://logging.apache.org/log4j/index.html">log4j</a></li>
+  <li><a href="http://download.oracle.com/javase/6/docs/api/java/util/logging/package-summary.html">java.util.logging</a> (as of r1169918)</li>
+  <li>Configures logging through our own implementation of the SLF4J backend API</li>
+</ul>
+<h2>Initial Configuration</h2>
+<p>The <code>org.apache.sling.commons.log</code> bundle gets the initial configuration from the following <code>BundleContext</code> properties:</p>
+<table>
+  <thead>
+    <tr>
+      <th>Property </th>
+      <th>Default </th>
+      <th>Description </th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td><code>org.apache.sling.commons.log.level</code> </td>
+      <td><code>INFO</code> </td>
+      <td>Sets the initial logging level of the root logger. This may be any of the defined logging levels <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code> and <code>FATAL</code>. </td>
+    </tr>
+    <tr>
+      <td><code>org.apache.sling.commons.log.file</code> </td>
+      <td>undefined </td>
+      <td>Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to <code>System.out</code>. </td>
+    </tr>
+    <tr>
+      <td><code>org.apache.sling.commons.log.file.number</code> </td>
+      <td>5 </td>
+      <td>The number of rotated files to keep. </td>
+    </tr>
+    <tr>
+      <td><code>org.apache.sling.commons.log.file.size</code> </td>
+      <td>'.'yyyy-MM-dd </td>
+      <td>Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section <em>Log File Rotation</em> below for full details on log file rotation. </td>
+    </tr>
+    <tr>
+      <td><code>org.apache.sling.commons.log.pattern</code> </td>
+      <td>{0,date,dd.MM.yyyy HH:mm:ss.SSS} <em>{4}</em> [{2}]({{ refs.-2.path }}) {3} {5} </td>
+      <td>The <code>MessageFormat</code> pattern to use for formatting log messages with the root logger. </td>
+    </tr>
+    <tr>
+      <td><code>org.apache.sling.commons.log.julenabled</code> </td>
+      <td>n/a </td>
+      <td>Enables the <code>java.util.logging</code> support. </td>
+    </tr>
+  </tbody>
+</table>
+<h2>User Configuration</h2>
+<p>User Configuration after initial configuration is provided by the Configuration Admin Service. To this avail two <code>org.osgi.services.cm.ManagedServiceFactory</code> services are registered under the PIDs <code>org.apache.sling.commons.log.LogManager.factory.writer</code> and <code>org.apache.sling.commons.log.LogManager.factory.config</code> which may receive configuration.</p>
+<h3>Logger Configuration</h3>
+<p>Loggers (or Categories) can be configured to log to specific files at specific levels using configurable patterns. To this avail factory configuration instances with factory PID <code>org.apache.sling.commons.log.LogManager.factory.config</code> may be created and configured with the Configuration Admin Service.</p>
+<p>The following properties may be set:</p>
+<table>
+  <thead>
+    <tr>
+      <th>Property </th>
+      <th>Type </th>
+      <th>Default </th>
+      <th>Description </th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td><code>org.apache.sling.commons.log.level</code> </td>
+      <td><code>String</code> </td>
+      <td><code>INFO</code> </td>
+      <td>Sets the logging level of the loggers. This may be any of the defined logging levels <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code> and <code>FATAL</code>. </td>
+    </tr>
+    <tr>
+      <td><code>org.apache.sling.commons.log.file</code> </td>
+      <td><code>String</code> </td>
+      <td>undefined </td>
+      <td>Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to <code>System.out</code>. This property should refer to the file name of a configured Log Writer (see below). If no Log Writer is configured with the same file name an implicit Log Writer configuration with default configuration is created. </td>
+    </tr>
+    <tr>
+      <td><code>org.apache.sling.commons.log.pattern</code> </td>
+      <td><code>String</code> </td>
+      <td>{0,date,dd.MM.yyyy HH:mm:ss.SSS} <em>{4}</em> [{2}]({{ refs.-2.path }}) {3} {5} </td>
+      <td>The <code>java.util.MessageFormat</code> pattern to use for formatting log messages with the root logger. This is a <code>java.util.MessageFormat</code> pattern supporting up to six arguments: {0} The timestamp of type <code>java.util.Date</code>, {1} the log marker, {2} the name of the current thread, {3} the name of the logger, {4} the debug level and {5} the actual debug message. If the log call includes a Throwable, the stacktrace is just appended to the message regardless of the pattern. </td>
+    </tr>
+  </tbody>
+</table>
+<p>| <code>org.apache.sling.commons.log.names</code> | <code>String[]</code> | -- | A list of logger names to which this configuration applies. |</p>
+<p>Note that multiple Logger Configurations may refer to the same Log Writer Configuration. If no Log Writer Configuration exists whose file name matches the file name set on the Logger Configuration an implicit Log Writer Configuration with default setup (daily log rotation) is internally created.</p>
+<h3>Log Writer Configuration</h3>
+<p>Log Writer Configuration is used to setup file output and log file rotation characteristics for log writers used by the Loggers.</p>
+<p>The following properties may be set:</p>
+<table>
+  <thead>
+    <tr>
+      <th>Property </th>
+      <th>Default </th>
+      <th>Description </th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td><code>org.apache.sling.commons.log.file</code> </td>
+      <td>undefined </td>
+      <td>Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to <code>System.out</code>. </td>
+    </tr>
+    <tr>
+      <td><code>org.apache.sling.commons.log.file.number</code> </td>
+      <td>5 </td>
+      <td>The number of rotated files to keep. </td>
+    </tr>
+    <tr>
+      <td><code>org.apache.sling.commons.log.file.size</code> </td>
+      <td>'.'yyyy-MM-dd </td>
+      <td>Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section <em>Log File Rotation</em> below for full details on log file rotation. </td>
+    </tr>
+  </tbody>
+</table>
+<p>See the section <em>Log File Rotation</em> below for full details on the <code>org.apache.sling.commons.log.file.size</code> and <code>org.apache.sling.commons.log.file.number</code> properties.</p>
+<h2>Log File Rotation</h2>
+<p>Log files can grow rather quickly and fill up available disk space. To cope with this growth log files may be rotated in two ways: At specific times or when the log file reaches a configurable size. The first method is called <em>Scheduled Rotation</em> and is used by specifying a <code>SimpleDateFormat</code> pattern as the log file "size". The second method is called <em>Size Rotation</em> and is used by setting a maximum file size as the log file size.</p>
+<p>As of version 2.0.6 of the Sling Commons Log bundle, the default value for log file scheduling is <code>&#39;.&#39;yyyy-MM-dd</code> causing daily log rotation. Previously log rotation defaulted to a 10MB file size limit.</p>
+<h3>Scheduled Rotation</h3>
+<p>The rolling schedule is specified by setting the <code>org.apache.sling.commons.log.file.size</code> property to a <code>java.text.SimpleDateFormat</code> pattern. Literal text (such as a leading dot) to be included must be <em>enclosed</em> within a pair of single quotes. A formatted version of the date pattern is used as the suffix for the rolled file name.</p>
+<p>For example, if the log file is configured as <code>/foo/bar.log</code> and the pattern set to <code>&#39;.&#39;yyyy-MM-dd</code>, on 2001-02-16 at midnight, the logging file <code>/foo/bar.log</code> will be renamed to <code>/foo/bar.log.2001-02-16</code> and logging for 2001-02-17 will continue in a new <code>/foo/bar.log</code> file until it rolls over the next day.</p>
+<p>It is possible to specify monthly, weekly, half-daily, daily, hourly, or minutely rollover schedules.</p>
+<table>
+  <thead>
+    <tr>
+      <th>DatePattern </th>
+      <th>Rollover schedule </th>
+      <th>Example </th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td><code>&#39;.&#39;yyyy-MM</code> </td>
+      <td>Rollover at the beginning of each month </td>
+      <td>At midnight of May 31st, 2002 <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2002-05</code>. Logging for the month of June will be output to <code>/foo/bar.log</code> until it is also rolled over the next month. </td>
+    </tr>
+    <tr>
+      <td><code>&#39;.&#39;yyyy-ww</code> </td>
+      <td>Rollover at the first day of each week. The first day of the week depends on the locale. </td>
+      <td>Assuming the first day of the week is Sunday, on Saturday midnight, June 9th 2002, the file <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2002-23</code>. Logging for the 24th week of 2002 will be output to <code>/foo/bar.log</code> until it is rolled over the next week. </td>
+    </tr>
+    <tr>
+      <td><code>&#39;.&#39;yyyy-MM-dd</code> </td>
+      <td>Rollover at midnight each day.</td>
+      <td>At midnight, on March 8th, 2002, <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2002-03-08</code>. Logging for the 9th day of March will be output to <code>/foo/bar.log</code> until it is rolled over the next day.</td>
+    </tr>
+    <tr>
+      <td><code>&#39;.&#39;yyyy-MM-dd-a</code> </td>
+      <td>Rollover at midnight and midday of each day.</td>
+      <td>at noon, on March 9th, 2002, <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2002-03-09-AM</code>. Logging for the afternoon of the 9th will be output to <code>/foo/bar.log</code> until it is rolled over at midnight.</td>
+    </tr>
+    <tr>
+      <td><code>&#39;.&#39;yyyy-MM-dd-HH</code> </td>
+      <td>Rollover at the top of every hour.</td>
+      <td>At approximately 11:00.000 o'clock on March 9th, 2002, <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2002-03-09-10</code>. Logging for the 11th hour of the 9th of March will be output to <code>/foo/bar.log</code> until it is rolled over at the beginning of the next hour.</td>
+    </tr>
+    <tr>
+      <td><code>&#39;.&#39;yyyy-MM-dd-HH-mm</code> </td>
+      <td>Rollover at the beginning of every minute.</td>
+      <td>At approximately 11:23,000, on March 9th, 2001, <code>/foo/bar.log</code> will be copied to <code>/foo/bar.log.2001-03-09-10-22</code>. Logging for the minute of 11:23 (9th of March) will be output to <code>/foo/bar.log</code> until it is rolled over the next minute.</td>
+    </tr>
+  </tbody>
+</table>
+<p>Do not use the colon ":" character in anywhere in the pattern option. The text before the colon is interpeted as the protocol specificaion of a URL which is probably not what you want.</p>
+<p>Note that Scheduled Rotation ignores the <code>org.apache.sling.commons.log.file.number</code> property since the old log files are not numbered but "dated".</p>
+<h3>Size Rotation</h3>
+<p>Log file rotation by size is specified by setting the <code>org.apache.sling.commons.log.file.size</code> property to a plain number or a number plus a size multiplier. The size multiplier may be any of <code>K</code>, <code>KB</code>, <code>M</code>, <code>MB</code>, <code>G</code>, or <code>GB</code> where the case is ignored and the meaning is probably obvious.</p>
+<p>When using Size Rotation, the <code>org.apache.sling.commons.log.file.number</code> defines the number of old log file generations to keep. For example to keep 5 old log files indexed by 0 through 4, set the <code>org.apache.sling.commons.log.file.number</code> to <code>5</code> (which happens to be the default).</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/pax-exam-utils.html
----------------------------------------------------------------------
diff --git a/documentation/pax-exam-utils.html b/documentation/pax-exam-utils.html
new file mode 100644
index 0000000..97c28a1
--- /dev/null
+++ b/documentation/pax-exam-utils.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Sling Pax Exam Utilities</h1></header><p>Utilities to help testing Sling components with Pax Exam are available at <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/sling-pax-util">https://svn.apache.org/repos/asf/sling/trunk/testing/sling-pax-util</a></p>
+<p>The focus is on making it easier to test Sling components against a full Sling launchpad, with minimal boilerplate code.</p>
+<p>See the <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/sling-pax-util/src/test/java/org/apache/sling/paxexam/util/SlingRepositoryTest.java">SlingRepositoryTest</a> class for an example test.</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine.html b/documentation/the-sling-engine.html
new file mode 100644
index 0000000..6214130
--- /dev/null
+++ b/documentation/the-sling-engine.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>The Sling Engine</h1></header><h2>General</h2>
+<ul>
+  <li><a href="/documentation/the-sling-engine/architecture.html">Architecture</a></li>
+  <li><a href="/documentation/the-sling-engine/authentication.html">Authentication</a></li>
+  <li><a href="/documentation/the-sling-engine/service-authentication.html">{{ refs.service-authentication.headers.title }}</a></li>
+</ul>
+<h2>Request Handling</h2>
+<ul>
+  <li><a href="/documentation/the-sling-engine/dispatching-requests.html">Dispatching Requests</a></li>
+  <li><a href="/documentation/the-sling-engine/url-decomposition.html">URL decomposition</a></li>
+  <li><a href="/documentation/the-sling-engine/url-to-script-resolution.html">URL to Script Resolution</a></li>
+  <li><a href="/documentation/the-sling-engine/request-listeners.html">Request Listeners</a></li>
+  <li><a href="/documentation/the-sling-engine/filters.html">Filters</a></li>
+  <li><a href="/documentation/the-sling-engine/servlets.html">Servlets and Scripts</a></li>
+  <li><a href="/documentation/the-sling-engine/errorhandling.html">Errorhandling</a></li>
+  <li><a href="/documentation/the-sling-engine/request-parameters.html">Request Parameters</a></li>
+</ul>
+<h2>Resources</h2>
+<ul>
+  <li><a href="/documentation/the-sling-engine/resources.html">Resources</a></li>
+  <li><a href="/documentation/the-sling-engine/sling-api-crud-support.html">Sling API CRUD Support</a></li>
+  <li><a href="/documentation/the-sling-engine/wrap-or-decorate-resources.html">Wrap or Decorate Resources</a></li>
+  <li><a href="/documentation/the-sling-engine/mappings-for-resource-resolution.html">Mappings for Resource Resolution</a></li>
+</ul>
+<h2>Misc</h2>
+<ul>
+  <li><a href="/documentation/the-sling-engine/adapters.html">Adapters</a></li>
+  <li><a href="/documentation/the-sling-engine/featureflags.html">{{ refs.featureflags.headers.title }}</a></li>
+</ul></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/adapters.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/adapters.html b/documentation/the-sling-engine/adapters.html
new file mode 100644
index 0000000..7656516
--- /dev/null
+++ b/documentation/the-sling-engine/adapters.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Adapters</h1></header><p>[TOC]</p>
+<p>The <code>Resource</code> and <code>ResourceResolver</code> interfaces are defined with a method <code>adaptTo</code>, which adapts the object to other classes. Using this mechanism the JCR session of the resource resolver calling the <code>adaptTo</code> method with the <code>javax.jcr.Session</code> class object. Likewise the JCR node on which a resource is based can be retrieved by calling the <code>Resource.adaptTo</code> method with the <code>javax.jcr.Node</code> class object.</p>
+<p>To use resources as scripts, the <code>Resource.adaptTo</code> method must support being called with the <code>org.apache.sling.api.script.SlingScript</code> class object. But of course, we do not want to integrate the script manager with the resource resolver. To enable adapting objects to classes which are not foreseen by the original implementation, a factory mechanism is used. This way, the script manager can provide an adapter factory to adapt <code>Resource</code> to <code>SlingScript</code> objects.</p>
+<h1>Adaptable</h1>
+<p>The <code>Adaptable</code> interface defines the API to be implemented by a class providing adaptability to another class. The single method defined by this interface is</p>
+<p>/** * Adapts the adaptable to another type. * <p> * Please not that it is explicitly left as an implementation detail whether * each call to this method with the same <code>type</code> yields the same * object or a new object on each call. * <p> * Implementations of this method should document their adapted types as * well as their behaviour with respect to returning newly created or not * instance on each call. * * @param <AdapterType> The generic type to which this resource is adapted * to * @param type The Class object of the target type, such as * <code>javax.jcr.Node.class</code> or * <code>java.io.File.class</code> * @return The adapter target or <code>null</code> if the resource cannot * adapt to the requested type */ <AdapterType> AdapterType adaptTo(Class<AdapterType> type);</p>
+<p>This method is called to get a view of the same object in terms of another class. Examples of implementations of this method are the Sling <code>ResourceResolver</code> implementation providing adapting to a JCR session and the Sling JCR based <code>Resource</code> implementation providing adapting to a JCR node.</p>
+<h1>Listing Adaptation Possibilities</h1>
+<p>The Web Console Plugin at <code>/system/console/adapters</code> and at <code>/system/console/status-adapters</code> can be used to list all existing adaptables in the system with their according adapter classes.</p>
+<p>The web console plugin evaluates metadata being provided by any <code>AdapterFactory</code> services as well as metadata being provided through the file <code>SLING-INF/adapters.json</code></p>
+<h1>Implementing Adaptable</h1>
+<p>Each adaptable should derive from <code>SlingAdaptable</code> to automatically profit from all according <code>AdapterFactories</code> registered in the system. In case the <code>adaptTo(...)</code> method is being overwritten an according <code>SLING-INF/adapters.json</code> should be included in the providing bundle listing all adaptation possibilities. While this file is not strictly necessary for the actual adaptation to work, it provides useful information to the Web Console plugin. Otherwise developers will not know which adaptations are supported. The format of this JSON file looks like this (<a href="https://issues.apache.org/jira/browse/SLING-2295">SLING-2295</a>):</p>
+<p>{ <fully qualified class name of adaptable> : { <condition> : &lt;fully qualified class name of adapter, may be a JSON array&gt; } }</p>
+<p>For example</p>
+<p>{ "org.apache.sling.api.resource.Resource" : { "If the adaptable is a AuthorizableResource." : [ "java.util.Map", "org.apache.sling.api.resource.ValueMap", "org.apache.jackrabbit.api.security.user.Authorizable" ], "If the resource is an AuthorizableResource and represents a JCR User" : "org.apache.jackrabbit.api.security.user.User", "If the resource is an AuthorizableResource and represents a JCR Group" : "org.apache.jackrabbit.api.security.user.Group" } }</p>
+<p>Instead of manually creating that JSON file, the annotations from the module <a href="https://svn.apache.org/viewvc/sling/trunk/tooling/maven/adapter-annotations/">adapter-annotations</a> can be used together with the goal <code>generate-adapter-metadata</code> from the <a href="http://sling.apache.org/components/maven-sling-plugin/generate-adapter-metadata-mojo.html">Maven Sling Plugin</a> to generate it automatically (<a href="https://issues.apache.org/jira/browse/SLING-2313">SLING-2313</a>).</p>
+<h1>Extending Adapters</h1>
+<p>Sometimes an <code>Adaptable</code> implementation cannot foresee future uses and requirements. To cope with such extensibility requirements two interfaces and an abstract base class are defined:</p>
+<ul>
+  <li><code>AdapterManager</code></li>
+  <li><code>AdapterFactory</code></li>
+  <li><code>SlingAdaptable</code></li>
+</ul>
+<h2>AdapterFactory</h2>
+<p>The <code>AdapterFactory</code> interface defines the service interface and API for factories supporting extensible adapters for <code>SlingAdaptable</code> objects. The interface has a single method:</p>
+<p>/** * Adapt the given object to the adaptable type. The adaptable object is * guaranteed to be an instance of one of the classes listed in the * {@link #ADAPTABLE_CLASSES} services registration property. The type * parameter is one of the classes listed in the {@link #ADAPTER_CLASSES} * service registration properties. * <p> * This method may return <code>null</code> if the adaptable object cannot * be adapted to the adapter (target) type for any reason. In this case, the * implementation should log a message to the log facility noting the cause * for not being able to adapt. * <p> * Note that the <code>adaptable</code> object is not required to implement * the <code>Adaptable</code> interface, though most of the time this method * is called by means of calling the {@link Adaptable#adaptTo(Class)} * method. * * @param <AdapterType> The generic type of the adapter (target) type. * @param adaptable The object to adapt to the adapter type. * @param type The type to which the object 
 is to be adapted. * @return The adapted object or <code>null</code> if this factory instance * cannot adapt the object. */ <AdapterType> AdapterType getAdapter(Object adaptable, Class<AdapterType> type);</p>
+<p>Implementations of this interface are registered as OSGi services providing two lists: The list of classes which may be adapted (property named <code>adaptables</code>) and the list of classes to which the adapted class may be adapted (property named <code>adapters</code>). A good example of an Class implementing <code>AdapterFactory</code> is the <code>SlingScriptAdapterFactory</code>. In addition a property named <code>adapter.condition</code> can be provided which is supposed to contain a string value explaining under which circumstances the adaption will work (if there are any restrictions). This is evaluated by the Web Console Plugin.</p>
+<p><code>AdapterFactory</code> services are gathered by a <code>AdapterManager</code> implementation for use by consumers. Consumers should not care for <code>AdapterFactory</code> services.</p>
+<h2>AdapterManager</h2>
+<p>The <code>AdapterManager</code> is defines the service interface for the generalized and extensible use of <code>AdapterFactory</code> services. Thus the adapter manager may be retrieved from the service registry to try to adapt whatever object that needs to be adapted - provided appropriate adapters exist.</p>
+<p>The <code>AdapterManager</code> interface is defined as follows:</p>
+<p>/** * Returns an adapter object of the requested <code>AdapterType</code> for * the given <code>adaptable</code> object. * <p> * The <code>adaptable</code> object may be any non-<code>null</code> object * and is not required to implement the <code>Adaptable</code> interface. * * @param <AdapterType> The generic type of the adapter (target) type. * @param adaptable The object to adapt to the adapter type. * @param type The type to which the object is to be adapted. * @return The adapted object or <code>null</code> if no factory exists to * adapt the <code>adaptable</code> to the <code>AdapterType</code> * or if the <code>adaptable</code> cannot be adapted for any other * reason. */ <AdapterType> AdapterType getAdapter(Object adaptable, Class<AdapterType> type);</p>
+<p>Any object can theoretically be adapted to any class even if it does not implement the <code>Adaptable</code> interface, if an <code>AdapterFactory</code> service delivers a <code>getAdapter()</code> method which adapts an object to another one. To check if there's any existing <code>AdapterFactory</code> which can adapt a given object to another one the <code>AdapterManager</code> service with its <code>getAdapter()</code> method does the job. So the <code>Adaptable</code> interface merely is an indicator that the object provides built-in support for being adapted.</p>
+<h2>SlingAdaptable</h2>
+<p>The <code>SlingAdaptable</code> class is an implementation of the <code>Adaptable</code> interface which provides built-in support to call the <code>AdapterManager</code> to provide an adapter from the <code>Adaptable</code> object to the requested class.</p>
+<p>An example of extending the <code>SlingAdaptable</code> class will be the Sling JCR based <code>Resource</code> implementation. This way, such a resource may be adapted to a <code>SlingScript</code> by means of an appropriately programmed <code>AdapterFactory</code> (see below).</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/architecture.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/architecture.html b/documentation/the-sling-engine/architecture.html
new file mode 100644
index 0000000..01a4169
--- /dev/null
+++ b/documentation/the-sling-engine/architecture.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Architecture</h1></header><p>The following is a short list of high-lights of Sling:</p>
+<ul>
+  <li><strong><a href="#osgi">OSGi</a></strong> &mdash; The Sling application is built as a series of OSGi bundles and makes heavy use of a number of OSGi core and compendium services.</li>
+  <li><strong><a href="#sling-api">Sling API</a></strong> &mdash; To implement content based Web applications with Sling, an API has been defined, this extends the Servlet API and provides more functionality to work on the content.</li>
+  <li><strong><a href="#request-processing">Request Processing</a></strong> &mdash; Sling takes a unique approach to handling requests in that a request URL is first resolved to a resource, then based on the resource (and only the resource) it selects the actual servlet or script to handle the request.</li>
+  <li><strong><a href="#resources">Resources</a></strong> &mdash; The central mantra of Sling is the <em>Resource</em>, which represents the resource addressed by any request URL. It is the resource that is first resolved when handling a request. Based on the resource, a first servlet or script is then accessed to actually handle the request.</li>
+  <li><strong><a href="#servlets-and-scripts">Servlets and Scripts</a></strong> &mdash; Servlets and Scripts are handled uniformly in that they are represented as resources themselves and are accessible by a resource path.</li>
+  <li><strong><a href="#launchpad">Launchpad</a></strong> &mdash; Sling uses a very thin launcher to integrate with an existing servlet container, launching Sling as a Web application or providing a main class to represent a standalone Java application.</li>
+</ul>
+<p>The following sections elaborate on each of these highlights.</p>
+<h2>OSGi</h2>
+<p><a href="http://www.osgi.org">OSGi</a> is a consortium that has developed a specification to build modular and extensible applications. This offers <a href="http://www.osgi.org/About/WhyOSGi">various benefits</a>. We deal mainly with two parts of the specifications: The Core Specification, which defines the OSGi Framework and Core Services, and the Compendium Services Specification, which defines a host of services that extend the functionality of the OSGi Framework.</p>
+<h3>OSGi Framework</h3>
+<p>The OSGi Framework is made up of three layers &ndash; Module, Lifecycle, and Services &ndash; that define how extensible applications are built and deployed. The responsibilities of the layers are:</p>
+<ul>
+  <li><strong>Module</strong> &mdash; Defines how a module, or a <em>Bundle</em> in OSGi-speak, is defined. Basically, a bundle is just a plain old JAR file, whose manifest file has some defined entries. These entries identify the bundle with a symbolic name, a version and more. In addition there are headers which define what a bundle provides <code>Export-Package</code> and what a bundle requires to be operative <code>Import-Package</code> and <code>Require-Bundle</code>.</li>
+  <li><strong>Lifecycle</strong> &mdash; The lifecycle layer defines the states a bundle may be in and describes the state changes. By providing a class, which implements the <code>BundleActivator</code> interface and which is named in the <code>Bundle-Activator</code> manifest header, a bundle may hook into the lifecycle process when the bundle is started and stopped.</li>
+  <li><strong>Services</strong> &mdash; For the application to be able to interact, the OSGi Core Specification defines the service layer. This describes a registry for services, which may be shared.</li>
+</ul>
+<h3>Compendium Services</h3>
+<p>Based on the OSGi Framework specification, the Compendium Services specification defines a (growing) number of extension services, which may be used by applications for various tasks. Of these Compendium Services, Sling is using just a small number:</p>
+<ul>
+  <li><strong>Log Service</strong> &mdash; Sling comes with its own implementation of the OSGi Log Service specification. The respective bundle not only provides this implementation, it also exports the SLF4J, Log4J and Commons Logging APIs needed for the Sling application to perform logging.</li>
+  <li><strong>Http Service</strong> &mdash; Sling leverages the OSGi Http Service to hook into a servlet container to provide the Web Application Framework mechanism.</li>
+  <li><strong>Configuration Admin Service</strong> &mdash; To simplify configuration of services in Sling, the OSGi Configuration Admin service is used. This provides a uniform API to configure services and to build configuration management agents.</li>
+  <li><strong>Metatype Service</strong> &mdash; The OSGi Metatype Service defines a way to describe the data types. Sling uses this service to describe the configurations that may be created using the Configuration Admin Service. These meta type descriptions are used by configuration management agents to present to user interface to manage the configurations.</li>
+  <li><strong>Event Admin Service</strong> &mdash; Sling uses the OSGi EventAdmin service to dispatch events when scheduling tasks.</li>
+  <li><strong>Declarative Services</strong> &mdash; One of the most important (beside the Log Service) services used by Sling is the Declarative Services Specification. This specification defines how to declaratively create components and services to have the Declarative Services runtime actually manage the lifecycle, configuration and references of components.</li>
+</ul>
+<h2>Sling API</h2>
+<p>The Sling API is an extension to the Servlet API which provides more functionality to interact with the Sling framework and also to extend Sling itself and to implement Sling applications.</p>
+<p>See the [Sling API]({{ refs.sling-api.path }}) page for more information.</p>
+<h2>Request Processing</h2>
+<p>Traditional Web Application framework emply more or less elaborate methods to select a Servlet or Controller based on the request URL, which in turn tries to load some data (usually from a database) to act upon and finally to render the result somehow.</p>
+<p>Sling turns this processing around in that it places the data to act upon at the center and consequently uses the request URL to first resolve the data to process. This data is internally represented as an instance of the <code>Resource</code> interface. Based on this resource as well as the request method and more properties of the request URL a script or servlet is then selected to handle the request.</p>
+<p>See the <a href="/documentation/the-sling-engine/servlets.html">Servlets</a> page for more information.</p>
+<h2>Resources</h2>
+<p>The Resource is one of the central parts of Sling. Extending from JCR's <em>Everything is Content</em>, Sling assumes <em>Everthing is a Resource</em>. Thus Sling is maintaining a virtual tree of resources, which is a merger of the actual contents in the JCR Repository and resources provided by so called resource providers.</p>
+<p>Each resource has a path by which it is addressed in the resource tree, a resource type and some resource metadata (such as file size, last modification time). It is important to understand, that a <code>Resource</code> instance actually is only a handle to the actual data. By virtue of the <code>adaptTo(Class&lt;Type&gt;)</code> method, a resource may be coerced into another data type, which may then be used while processing the request. Examples of data types are <code>javax.jcr.Node</code> and <code>java.io.InputStream</code>.</p>
+<p>See the <a href="/documentation/the-sling-engine/resources.html">Resources</a> page for more information.</p>
+<h2>Servlets and Scripts</h2>
+<p>Scripts are usually provided as content in a JCR repository. But since Sling is using a resource tree, a script actually is represented as a Resource and may be provided from within a Bundle (by virtue of the bundle resource provider) or even from the platform file system (by virtue of the file system resource provider).</p>
+<p>Accessing scripts in the resource tree, allows for a very easy to understand mapping from resource type to some script path.</p>
+<p>Having found the script resource, we still need access to the appropriate script language implementation to evaluate the script. To this avail, Sling is making use of the <code>Resource.adaptTo(Class&lt;Type&gt;)</code> method: If a script language implementation is available for the extension of the script name an adaptor for the script resource can be found, which handles the evaluation of the script.</p>
+<p>Besides scripting languages, such as ECMAScript, Groovy, JSP, Sling also supports regular servlets. To be able to use servlets for request processing, such servlets must be registered as OSGi services for the <code>javax.servlet.Servlet</code> interface and provide a number of service registration properties, which are used to use the servlets. In fact servlets thus registered as OSGi services are mapped into the resource tree by means of a servlet resource provider. This resource provider mapps the servlets into the resource tree using the service registration properties to build one or more resource paths for the servlet.</p>
+<p>As a result of mapping servlets into the resource tree and the possibility to adapt resource to an adaptor data type, scripts and servlets may be handled completely transparently: The servlet resolver just looks for a resource matching the resource type and adapts the resource found to <code>javax.jcr.Servlet</code>. If the resource happens to be provided by a servlet resource provider, the adapter is of course the servlet itself. If the resource happens to be a script, the adapter is a servlet facade which internally calls the script language implementation to evaluate the script.</p>
+<p>See the [Servlet Resolution]({{ refs.servlet-resolution.path }}) page for more information.</p>
+<h2>Launchpad</h2>
+<p>Sling may be launched as a standalone application using the Sling Application or as a Web Application running inside any Servlet API 2.4 or newer Servlet Container.</p>
+<p>The Sling Application is a standalone Java Application which is really small: Just the main class and some glue classes. The OSGi framework as well as the OSGi API libraries are packaged as a JAR file, which is loaded through a custom classloader. This enables to update the framework and/or OSGi API libraries from within Sling by updating the system bundle.</p>
+<p>The Sling Servlet is equally small as the Sling Application. It uses the Felix <code>HttpService</code> bridge as the glue between the servlet container and the OSGi framework.</p>
+<p>As we have seen, Sling may be launched as a standalone Java Application or as a Web Application inside any compliant Servlet Container. To hide the differences of the launching mechanism, Sling internally registers a Servlet with an OSGi <code>HttpService</code>. Regardless of how Sling is launched, the Felix implementation of the OSGi <code>HttpService</code> specification is used. When Sling is launched as a standalone Java Application, Felix HttpService uses an embedded version of the Jetty servlet container. When Sling is launched as a Web Application, the Felix HttpService Bridge is used.</p>
+<p>Optionally, PAX Web's implementation of HttpService can be used when Sling is launched as a standalone Java Application. See the <a href="/documentation/development/maven-launchpad-plugin.html">Maven Launchpad Plugin</a> page for information on how to do this.</p>
+<p>See <a href="/documentation/the-sling-engine/the-sling-launchpad.html">The Sling Launchpad</a> for more information.</p></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/sling-site/blob/a6129baf/documentation/the-sling-engine/authentication.html
----------------------------------------------------------------------
diff --git a/documentation/the-sling-engine/authentication.html b/documentation/the-sling-engine/authentication.html
new file mode 100644
index 0000000..73007f3
--- /dev/null
+++ b/documentation/the-sling-engine/authentication.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html><html lang="en">
+    <head>
+<meta charset="utf-8"/>
+        <title>Apache Sling on JBake</title>
+        <link rel="stylesheet" href="/res/css/site.css"/>
+        <link rel="stylesheet" href="/res/css/codehilite.css"/>
+        <div class="title">
+            <div class="logo">
+                <a href="http://sling.apache.org">
+                    <img border="0" alt="Apache Sling" src="/res/logos/sling.svg"/>
+                </a>
+            </div><div class="header">
+                <a href="http://www.apache.org">
+                    <img border="0" alt="Apache" src="/res/logos/apache.png"/>
+                </a>
+            </div>
+        </div>        
+    </head><body>
+<div class="menu">
+            <strong><a href="/documentation.html">Documentation</a></strong><br/><a href="/documentation/getting-started.html">Getting Started</a><br/><a href="/documentation/the-sling-engine.html">The Sling Engine</a><br/><a href="/documentation/development.html">Development</a><br/><a href="/documentation/bundles.html">Bundles</a><br/><a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a><br/><a href="/documentation/configuration.html">Configuration</a><p></p><a href="http://s.apache.org/sling.wiki">Wiki</a><br/><a href="http://s.apache.org/sling.faq">FAQ</a><br/><p></p><strong>API Docs</strong><br/><a href="/apidocs/sling9/index.html">Sling 9</a><br/><a href="/apidocs/sling8/index.html">Sling 8</a><br/><a href="/apidocs/sling7/index.html">Sling 7</a><br/><a href="/apidocs/sling6/index.html">Sling 6</a><br/><a href="/apidocs/sling5/index.html">Sling 5</a><br/><a href="/javadoc-io.html">Archive at javadoc.io</a><br/><p></p><strong>Project info</strong><br/><a h
 ref="/downloads.cgi">Downloads</a><br/><a href="http://www.apache.org/licenses/">License</a><br/><a href="/contributing.html">Contributing</a><br/><a href="/news.html">News</a><br/><a href="/links.html">Links</a><br/><a href="/project-information.html">Project Information</a><br/><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a><br/><a href="http://ci.apache.org/builders/sling-trunk">Build Server</a><br/><a href="/project-information/security.html">Security</a><br/><p></p><strong>Source</strong><br/><a href="http://svn.apache.org/viewvc/sling/trunk">Subversion</a><br/><a href="git://git.apache.org/sling.git">Git</a><br/><a href="https://github.com/apache/sling">Github Mirror</a><br/><p></p><strong>Sponsorship</strong><br/><a href="http://www.apache.org/foundation/thanks.html">Thanks</a><br/><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a><br/><a href="https://donate.apache.org/">Donate!</a><br/><a href="http://www.apache.org/foun
 dation/buy_stuff.html">Buy Stuff</a><br/><p></p><strong><a href="/sitemap.html">Site Map</a></strong>
+        </div>        <div class="main">
+<div class="row"><div class="small-12 columns"><section class="wrap"><header><h1>Authentication</h1></header><p>Excerpt: How requests are authenticated.</p>
+<p>This section describes the framework provided by Sling to authenticate HTTP requests.</p>
+<p>Let's look at generic request processing of Sling: Sling is linked into the outside world by registering the Sling Main Servlet &ndash; implemented by the <code>SlingMainServlet</code> class in the Sling Engine bundle &ndash; with an OSGi <code>HttpService</code>. This registration is accompanyied with an implementation instance of the OSGi <code>HttpContext</code> interface, which defines a method to authenticate requests: <code>handleSecurity</code>.</p>
+<p>This method is called by the OSGi HTTP Service implementation after the servlet has been selected to handle the request but before actually calling the servlet's <code>service</code> method.</p>
+<a href="authentication.png" style="float:left;padding-right:5%">
+<img src="authentication.png" title="Authentication Flow" alt="Authentication Flow" />
+</a>
+<ol>
+  <li>First the OSGi HTTP Service implementation is analyzing the request URL to find a match for a servlet or resource registered with the HTTP Service.</li>
+  <li>Now the HTTP Service implementation has to call the <code>handleSecurity</code> method of the <code>HttpContext</code> object with which the servlet or resource has been registered. This method returns <code>true</code> if the request should be serviced. If this method returns <code>false</code> the HTTP Service implementation terminates the request sending back any response which has been prepared by the <code>handleSecurity</code> method. Note, that the <code>handleSecurity</code> method must prepare the failure response sent to the client, the HTTP Service adds nothing here. If the <code>handleSecurity</code> method is successful, it must add two (or three) request attributes described below.</li>
+  <li>When the <code>handleSecurity</code> method returns <code>true</code> the HTTP Service either calls the <code>Servlet.service</code> method or sends back the requested resource depending on whether a servlet or a resource has been selected in the first step.</li>
+</ol>
+<p>The important thing to note here is, that at the time the <code>handleSecurity</code> method is called, the <code>SlingMainServlet</code> is not yet in control of the request. So any functionality added by the <code>SlingMainServlet</code>, notably the <code>SlingHttpServletRequest</code> and <code>SlingHttpServletResponse</code> objects are not available to the implementation of the <code>handleSecurity</code> method.</p>
+<p>The following pages describe the full details of request authentication in Sling in full detail:</p>
+<ul>
+  <li><a href="/documentation/the-sling-engine/authentication/authentication-tasks.html">Tasks</a>: {{ refs.authentication-tasks.headers.excerpt }}</li>
+  <li><a href="/documentation/the-sling-engine/authentication/authentication-actors.html">Actors</a>: {{ refs.authentication-actors.headers.excerpt }}</li>
+  <li><a href="/documentation/the-sling-engine/authentication/authentication-framework.html">Framework</a>: {{ refs.authentication-framework.headers.excerpt }}</li>
+  <li><a href="/documentation/the-sling-engine/authentication/authentication-authenticationhandler.html">AuthenticationHandler</a>: {{ refs.authentication-authenticationhandler.headers.excerpt }}</li>
+</ul></section></div></div>            
+<div class="footer">
+                <div class="timestamp">
+                    TODO display revision number here
+                </div><div class="trademarkFooter">
+                    Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+                </div>
+            </div>            
+            
+        </div>
+    </body>
+</html>