incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r813967 [5/16] - /websites/staging/sling/trunk/content/
Date Sun, 22 Apr 2012 16:52:31 GMT
Added: websites/staging/sling/trunk/content/dispatching-requests.html
==============================================================================
--- websites/staging/sling/trunk/content/dispatching-requests.html (added)
+++ websites/staging/sling/trunk/content/dispatching-requests.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,288 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Dispatching Requests</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Dispatching Requests</h1>
+      <div>
+	    <p><a name="DispatchingRequests-RequestProcessing"></a></p>
+<h1 id="request-processing">Request Processing</h1>
+<p><a name="DispatchingRequests-Mainprocess"></a></p>
+<h2 id="main-process">Main process</h2>
+<p>The following steps should give you an overview how a request is processed
+in Sling. Details can be found under provided links.</p>
+<p><a name="DispatchingRequests-Step1"></a></p>
+<h3 id="step-1">Step 1</h3>
+<p>The client sends the request</p>
+<p><a name="DispatchingRequests-Step2"></a></p>
+<h3 id="step-2">Step 2</h3>
+<p>This step applies only if a Servlet Container is installed and Sling is
+embedded:
+Servlet Container gets request and forwards to OSGi HttpService</p>
+<p><a name="DispatchingRequests-Step3"></a></p>
+<h3 id="step-3">Step 3</h3>
+<p>OSGi HttpService looks for responsible registered Servlet or resource (see
+102.4 of the OSGi compendium)</p>
+<p><a name="DispatchingRequests-Step4"></a></p>
+<h3 id="step-4">Step 4</h3>
+<p>OSGi HttpService calls <em>handleSecurity</em> of the HttpContext associated
+with the servlet/resource. In case of Sling this calls into
+SlingMainServlet.handleSecurity and then into
+SlingAuthenticator.authenticate</p>
+<p><a name="DispatchingRequests-Step4a"></a></p>
+<h3 id="step-4a">Step 4a</h3>
+<p>SlingAuthenticator selects an authentication handler for the request and
+forwards the authenticate call. On success a <em>javax.jcr.Session</em> is
+created, the request attributes required by the HTTP Service spec are set
+(like <em>org.osgi.service.http.authentication.remote.user</em> and
+<em>org.osgi.service.http.authentication.type</em>and also the
+<em>javax.jcr.Session</em> which is used later is set in the request attributes.
+On success, continue with step 5.</p>
+<p><a name="DispatchingRequests-Step4b"></a></p>
+<h3 id="step-4b">Step 4b</h3>
+<p>If authentication fails either an anonymous session is acquired (if
+anonymous is allowed per configuration) or the login method is called.
+If anonymous is allowed, continue with step 5.</p>
+<p><a name="DispatchingRequests-Step4c"></a></p>
+<h3 id="step-4c">Step 4c</h3>
+<p>The login method selects an AuthenticationHandler and forwards the login
+call to the AuthenticationHandler.requestAuthentication method to cause the
+client to authenticate. Request processing stops here
+(<em>SlingMainServlet.handleSecurity</em> returns false).</p>
+<p><a name="DispatchingRequests-Step5"></a></p>
+<h3 id="step-5">Step 5</h3>
+<p>After getting a response the HttpService either terminates the request (if
+authentication failed and <em>SlingMainServlet.handleSecurity</em> returned
+false) or continues by either spooling the resource or in the case of Sling
+calling the <em>SlingMainServlet.service</em> method.</p>
+<p><a name="DispatchingRequests-Step6"></a></p>
+<h3 id="step-6">Step 6</h3>
+<p>The <em>SlingMainServlet.service</em> method is the entry point into the Sling
+proper. This method sets up the request:
+<em> Wraps the </em>HttpServletRequest<em> and the </em>HttpServletResponse<em> into the
+</em>SlingHttpServletRequest<em> and the </em>SlingHttpServletResponse<em>
+</em> Checks if Sling is ready for processing the request (checks at the moment
+for an existing ResourceResolverFactory service, a ServletResolver service
+and a MimeTypeService)
+<em> Create the ResourceResolver based on the Session (by default creates a
+</em>JcrResourceResolver2<em>)
+</em> Locate the <a href="slingxsite:resources.html">Resource</a>
+ on the basis of the request by calling <em>ResourceResovler.resolve</em>
+through <em>RequestData.initResource</em> (see also [URL decomposition]
+)
+<em> Locate the servlet or script (see <a href="servlets.html">Servlets</a>
+) by calling </em>ServletResolver.resolveServlet<em> through
+</em>RequestData.initServlet*</p>
+<p><a name="DispatchingRequests-Step7"></a></p>
+<h3 id="step-7">Step 7</h3>
+<p>After this setup, the request level filters are called (the ones registered
+as <em>javax.servlet.Filter</em> with the property <em>filter.scope=request</em>, see <a href="filters.html">Filters</a>
+ for details).
+If any called filter doesn't call <em>FilterChain.doFilter</em> at the end of
+the <em>Filter.doFilter</em> method request processing stops here.</p>
+<p><a name="DispatchingRequests-Step8"></a></p>
+<h3 id="step-8">Step 8</h3>
+<p>After having called all request level filters, the component level filters
+(registered with the property <em>filter.scope=component</em>, see <a href="filters.html">Filters</a>
+ for details) are called.</p>
+<p><a name="DispatchingRequests-Step9"></a></p>
+<h3 id="step-9">Step 9</h3>
+<p>After having called the component level filters, the request servlet or
+script is finally called to process the request.</p>
+<p><a name="DispatchingRequests-Include/Forward"></a></p>
+<h2 id="includeforward">Include/Forward</h2>
+<p>If a servlet or script is including another resource for processing through
+the <em>RequestDispatcher.include</em> or <em>RequestDispatcher.forward</em> (or any
+JSP or feature of another scripting language which relies on one of this
+two methods) the following processing takes place:</p>
+<p><a name="DispatchingRequests-Step1"></a></p>
+<h3 id="step-1_1">Step 1</h3>
+<p>Code in the processing servlet or script calls
+<em>RequestDispatcher.include</em> or <em>RequestDispatcher.forward</em>.</p>
+<p><a name="DispatchingRequests-Step2"></a></p>
+<h3 id="step-2_1">Step 2</h3>
+<p>The resource is resolved though ResourceResolver.getResource (if the
+RequestDispatcher has not been created with a resource already)</p>
+<p><a name="DispatchingRequests-Step3"></a></p>
+<h3 id="step-3_1">Step 3</h3>
+<p>The servlet or script to handle the resource is resolved calling the
+<em>ServletResolver.resolverServlet</em> method.</p>
+<p><a name="DispatchingRequests-Step4"></a></p>
+<h3 id="step-4_1">Step 4</h3>
+<p>The component level filters (registered with the property
+<em>filter.scope=component</em>) are called again (see <a href="filters.html">Filters</a>
+ for details).</p>
+<p><a name="DispatchingRequests-Step5"></a></p>
+<h3 id="step-5_1">Step 5</h3>
+<p>The servlet or script is called to process the request.</p>
+<p>Note that these steps are processed for every include or forward call.</p>
+<p><a name="DispatchingRequests-IncludedRequestAttributes"></a></p>
+<h2 id="included-request-attributes">Included Request Attributes</h2>
+<p>When servlet or script is called as a result of
+<em>RequestDispatcher.include</em> the following request attributes are set:</p>
+<table>
+<tr><td> Attribute Name
+</tr>
+Attribute Type | Description |
+<tr><td> *org.apache.sling.api.include.servlet*
+</tr>
+*javax.servlet.Servlet* | The name of the request attribute containing
+the *Servlet* which included the servlet currently being active. |
+<tr><td> *org.apache.sling.api.include.resource*
+</tr>
+*org.apache.sling.api.resource.Resource* | The name of the request
+attribute containing the *Resource* underlying the *Servlet* which
+included the servlet currently being active. |
+<tr><td> *org.apache.sling.api.include.request_path_info*
+</tr>
+*org.apache.sling.api.request.RequestPathInfo* | The name of the request
+attribute containing the *RequestPathInfo* underlying the *Servlet*
+which included the servlet currently being active |
+<tr><td> *javax.servlet.include.request_uri*
+</tr>
+*String* | The name of the request attribute containing the
+*HttpServletRequest.getRequestURI()* of the request which included the
+servlet currently being active underlying the *Servlet* which included
+the servlet currently being active.
+*Note:* In Sling, the *HttpServletRequest.getRequestURI()* method will
+always return the same result regardless of whether it is called from the
+client request processing servlet or script or from an included servlet or
+script. This request attribute is set for compatibility with the Servlet
+API specification. |
+<tr><td> *javax.servlet.include.context_path*
+</tr>
+*String* | The name of the request attribute containing the
+*HttpServletRequest.getContextPath()* of the request which included the
+servlet currently being active underlying the *Servlet* which included
+the servlet currently being active.
+*Note:* In Sling, the *HttpServletRequest.getContextPath()* method will
+always return the same result regardless of whether it is called from the
+client request processing servlet or script or from an included servlet or
+script. This request attribute is set for compatibility with the Servlet
+API specification. |
+<tr><td> *javax.servlet.include.servlet_path*
+</tr>
+*String* | The name of the request attribute containing the
+*HttpServletRequest.getServletPath()* of the request which included the
+servlet currently being active underlying the *Servlet* which included
+the servlet currently being active.
+*Note:* In Sling, the *HttpServletRequest.getServletPath()* method will
+always return the same result regardless of whether it is called from the
+client request processing servlet or script or from an included servlet or
+script. This request attribute is set for compatibility with the Servlet
+API specification. |
+<tr><td> *javax.servlet.include.path_info*
+</tr>
+*String* | The name of the request attribute containing the
+*HttpServletRequest.getPathInfo()* of the request which included the
+servlet currently being active underlying the *Servlet* which included
+the servlet currently being active.
+*Note:* In Sling, the *HttpServletRequest.getPathInfo()* method will
+always return the same result regardless of whether it is called from the
+client request processing servlet or script or from an included servlet or
+script. This request attribute is set for compatibility with the Servlet
+API specification.
+<tr><td> *javax.servlet.include.query_string*
+</tr>
+*String* | The name of the request attribute containing the
+*HttpServletRequest.getQueryString()* of the request which included the
+servlet currently being active underlying the *Servlet* which included
+the servlet currently being active.
+*Note:* In Sling, the *HttpServletRequest.getQueryString()* method will
+always return the same result regardless of whether it is called from the
+client request processing servlet or script or from an included servlet or
+script. This request attribute is set for compatibility with the Servlet
+API specification. |
+</table>
+
+<p>Constants are defined in the <em>org.apache.sling.api.SlingConstants</em> class
+for these request attributes.</p>
+<p><em>Note:</em> These request attributes are not set if the servlet or script is
+called to handle the request or as a result of
+<em>RequestDispatcher.forward</em>.</p>
+      </div>
+    </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>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/documentation.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation.html (added)
+++ websites/staging/sling/trunk/content/documentation.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,228 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Documentation</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Documentation</h1>
+      <div>
+	    <p><a name="Documentation-Documentation"></a></p>
+<h1 id="documentation">Documentation</h1>
+<p>The documentation is split into different parts:</p>
+<ul>
+<li><a href="getting-started.html">Getting Started</a>
+, the right place to start!</li>
+<li><a href="the-sling-engine.html">The Sling Engine</a>
+, all about the heart of Sling</li>
+<li><a href="development.html">Development</a>
+, how do I get and develop with Sling</li>
+<li><a href="bundles.html">Bundles</a>
+, which bundle delivers which features to Sling</li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="http://cwiki.apache.org/SLING/">Wiki</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API Doc</a></li>
+</ul>
+<p><a name="Documentation-Howcanyoucontribute"></a></p>
+<h2 id="how-can-you-contribute">How can you contribute</h2>
+<p>We're on the way to improve the documentation, but it's a long way. If you
+would like to contribute to the documentation you are very welcome. Please
+directly post your proposals to the <a href="http://cwiki.apache.org/SLING/">public wiki</a>
+ or post your suggestions to the mailing list.</p>
+<p><a name="Documentation-Howisthedocumentationgenerated"></a></p>
+<h2 id="how-is-the-documentation-generated">How is the documentation generated</h2>
+<p>The basic documentation of Sling is made up of four parts:</p>
+<ol>
+<li>The Sling Site at http://sling.apache.org/ (you are here)</li>
+<li>The Public Wiki at http://cwiki.apache.org/SLING</li>
+<li>The JavaDoc</li>
+<li>The Bundle documentation</li>
+</ol>
+<p>This page is about how this documentation is maintained and who is allowed
+to do what.</p>
+<p><a name="Documentation-TheSlingSite"></a></p>
+<h3 id="the-sling-site">The Sling Site</h3>
+<p><a name="Documentation-MainSite"></a></p>
+<h4 id="main-site">Main Site</h4>
+<p>The main Sling Site is maintained in the Confluence Wiki Space
+<em>SLINGxSITE</em>. The content of this space is automatically synchronized with
+the web server with a simple shell script <a href="^sling.sh.html">^sling.sh</a>
+ which is called regularly as per the following <em>crontab</em> entry:</p>
+<div class="codehilite"><pre><span class="c1"># sync wiki autoexport to Sling site</span>
+<span class="mi">1</span> <span class="o">*</span> <span class="o">*</span> <span class="o">*</span> <span class="o">*</span> <span class="p">(</span><span class="sr">/home/</span><span class="n">fmeschbe</span><span class="o">/</span><span class="n">sling</span><span class="o">.</span><span class="n">sh</span><span class="p">)</span>
+</pre></div>
+
+
+<p>Thus, after editing the site source in the Wiki, the rest happens
+automatically, it just takes some time -- in the order 2 hours or so --
+before the changes are visible at http://sling.apache.org/.</p>
+<p>Everybody is allowed to read the SLINGxSITE wiki and to add comments; but
+only committers of the Apache Sling project are allowed to edit the content
+and to manage the comments.</p>
+<p>The main site is located in the <em>site</em> folder below the Site URL <a href="http://sling.apache.org/">http://sling.apache.org/</a>
+ to which users are redirected automatically.</p>
+<p><a name="Documentation-SecondarySite"></a></p>
+<h4 id="secondary-site">Secondary Site</h4>
+<p>The Sling site contains secondary site parts that are maintained in the
+Apache SVN repository at <a href="http://svn.apache.org/repos/asf/sling/site">http://svn.apache.org/repos/asf/sling/site</a>
+. Updates to secondary parts of the site have to be done in the following
+steps:</p>
+<ol>
+<li>
+<p>Checkout or update the <a href="https://svn.apache.org/repos/asf/sling/site">site</a>
+ tree form SVN.</p>
+<p>$ svn checkout https://svn.apache.org/repos/asf/sling/site</p>
+</li>
+<li>
+<p>Apply your changes.</p>
+</li>
+<li>
+<p>Commit the changes back into SVN.</p>
+<p>$ svn commit -m"<enter your message here>"</p>
+</li>
+<li>
+<p>Login to <em>people.apache.org</em></p>
+<p>$ ssh people.apache.org</p>
+</li>
+<li>
+<p>Go to the location from where infrastructure mirroring is getting the
+actual sites and update from SVN.</p>
+<p>$ cd /x1/www/sling.apache.org
+$ svn update</p>
+</li>
+</ol>
+<p>After some time, the updates will be synchronized to the web servers and
+can be accessed.</p>
+<p><a name="Documentation-ThePublicWiki"></a></p>
+<h3 id="the-public-wiki">The Public Wiki</h3>
+<p>The public wiki of Sling is available at http://cwiki.apache.org/SLING and
+is maintained in the Confluence space <em>SLING</em>. This is a public wiki, in
+that after self-registration, everybody is allowed to edit content.</p>
+<p><a name="Documentation-TheJavaDoc"></a></p>
+<h3 id="the-javadoc">The JavaDoc</h3>
+<p>Up until now the JavaDoc of the Sling Bundles has not been published.</p>
+<p>I just polished the JavaDoc generation setup of Sling a bit, so that I
+could generate a first shot of aggregate JavaDocs. This draft can currently
+be found on my site at
+http://people.apache.org/~fmeschbe/slingdocs.762729/. This JavaDoc has been
+generated as follows:</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">svn</span> <span class="n">export</span> <span class="o">-</span><span class="n">r</span> <span class="mi">762729</span>
+</pre></div>
+
+
+<p>http://svn.apache.org/repos/asf/incubator/sling/trunk sling
+    $ mvn -DexcludePackageNames="<em>.impl:</em>.internal:<em>.jsp:sun.misc:</em>.juli"
+org.apache.maven.plugins:maven-javadoc-plugin:2.5:aggregate</p>
+<p>I am still unsure whether it makes sense to generate aggregate JavaDoc for
+all (or part of) the bundles of Sling. See also below regarding the Sites.</p>
+<p><a name="Documentation-TheBundleDocumentation"></a></p>
+<h3 id="the-bundle-documentation">The Bundle Documentation</h3>
+<p>Apart from the documentation of Sling on the Site and in the Wiki, it would
+also be thinkable that we accompany the source modules with some
+documentation and generate this using the Maven Site plugin. My tests so
+far for generating a multi-module site have not been very successful. But
+generating the site in a module-by-module manner might be a good thing, at
+least to get the per-module JavaDoc and some more code-oriented information
+like Surefire Reports, fixed bugs, etc.</p>
+<p>To prepare such Bundle Documentation I added a first shot at site
+generation setup to the parent project. For now, this includes the module's
+JavaDoc (of course), the Surefire reports and a report on the issues fixed
+(or open) with respect to some version. This site generation setup can be
+configured per module with two properties:</p>
+<table>
+<tr><th> Property </th><th> Description </th></tr>
+<tr><td> *site.jira.version.id* </td><td> The ID of the JIRA version whose bugs are to
+be listed in the JIRA report. This is a number, such as 12313306 (Sling API
+version 2.0.4). </td></tr>
+<tr><td> *site.javadoc.exclude* </td><td> The Java packages to not include with the
+JavaDoc generation. By default all packages containing *impl* or
+*internal* in their name are excluded. To add more packages for
+exclusion, list them in the format suitable for the [*excludePackageNames*](http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#excludePackageNames)
+ property of the Maven JavaDoc plugin. For example, to exclude any *jsp*
+and *juli* packages (see the _scripting/jsp_ bundle), this property would
+be set to *\*.jsp:\*.juli*. </td></tr>
+      </div>
+    </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>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/downloads.html
==============================================================================
--- websites/staging/sling/trunk/content/downloads.html (added)
+++ websites/staging/sling/trunk/content/downloads.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,483 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Downloads</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Downloads</h1>
+      <div>
+	    <p><a name="Downloads-Downloads"></a></p>
+<h1 id="downloads">Downloads</h1>
+<p>To get the latest development release of Apache Sling, you can check out
+the <a href="project-information#projectinformation-source.html">Source Code</a>
+ and [Getting and Building Sling]
+ yourself. Otherwise, the releases below are available for download. To
+install, just download and extract. These [KEYS|http://www.apache.org/dist/sling/KEYS]
+ can be used to verify the release archive.</p>
+<p>All Apache Sling products are distributed under the terms of The Apache
+Software License (version 2.0). See our <a href="project-license.html">license</a>
+, or the LICENSE file included in each distribution.</p>
+<p><a name="Downloads-Mirrors"></a></p>
+<h2 id="mirrors">Mirrors</h2>
+<p>Use the links below to download binary or source distributions of Apache
+Sling from one of our mirrors.</p>
+<p>You are currently using <em>[preferred](preferred.html)
+</em>. If you encounter a problem with this mirror, please select another
+mirror. If all mirrors are failing, there are backup mirrors (at the end of
+the mirrors list) that should be available.
+If the mirror displayed above is labeled <em>preferred</em>, then please reload
+this page by <a href="http://sling.apache.org/site/downloads.cgi">clicking here</a>
+.</p>
+<p>{html}
+<form action="<a href="location.html">location</a>
+" method="get" id="SelectMirror">
+Other mirrors: </P><select name="Preferred">
+<a href="if-any-http.html">if-any http</a>
+<a href="for-http.html">for http</a>
+<option value="[http]">[http]</option>[end]
+<a href="end.html">end</a>
+<a href="if-any-ftp.html">if-any ftp</a>
+<a href="for-ftp.html">for ftp</a>
+<option value="[ftp]">[ftp]</option>[end]
+<a href="end.html">end</a>
+<a href="if-any-backup.html">if-any backup</a>
+<a href="for-backup.html">for backup</a>
+<option value="[backup]">[backup] (backup)</option>[end]
+<a href="end.html">end</a>
+</select>
+<input type="submit" value="Change"></input>
+</form>
+{html}</p>
+<p><a name="Downloads-SlingApplication"></a></p>
+<h2 id="sling-application">Sling Application</h2>
+<table>
+<tr><th> Artifact </th><th> Version </th><th> Provides </th><th> Package </th></tr>
+<tr><td> Sling Standalone Application </td><td> 6 </td><td> A self-runnable Sling jar. </td><td>
+{downloadmirror:sling}org.apache.sling.launchpad-6-standalone.jar{downloadmirror}
+</td></tr>
+<tr><td> Sling Web Application </td><td> 6 </td><td> A ready-to run Sling webapp as a war file. </td><td>
+{downloadmirror:sling}org.apache.sling.launchpad-6.war{downloadmirror} </td></tr>
+
+{downloadmirror:sling}sling-6-source-release.zip{downloadmirror} |
+</table>
+
+<p>If you want to experiment with bleeding edge code, <a href="getting-and-building-sling.html">building Sling yourself</a>
+ is not that hard.</p>
+<p>If you are looking for previous releases of Apache Sling, have a look in
+the <a href="http://archive.apache.org/dist/sling/">archives</a>
+. For previous incubator releases of Apache Sling, have a look in the [Incubator archives|http://archive.apache.org/dist/incubator/sling/]
+.</p>
+<p><a name="Downloads-SlingComponents"></a></p>
+<h2 id="sling-components">Sling Components</h2>
+<table>
+<tr><th> Artifact </th><th> Version </th><th> Binary </th><th> Source </th></tr>
+<tr><td> Adapter </td><td> 2.0.12 </td><td>
+{slingdownload:jar}org.apache.sling.adapter-2.0.12{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.adapter-2.0.12-source-release{slingdownload}
+</td></tr>
+<tr><td> API </td><td> 2.2.4 </td><td>
+{slingdownload:jar}org.apache.sling.api-2.2.4{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.api-2.2.4-source-release{slingdownload}
+</td></tr>
+<tr><td> Auth Core </td><td> 1.0.6 </td><td>
+{slingdownload:jar}org.apache.sling.auth.core-1.0.6{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.auth.core-1.0.6-source-release{slingdownload}
+</td></tr>
+<tr><td> Auth Form </td><td> 1.0.4 </td><td>
+{slingdownload:jar}org.apache.sling.auth.form-1.0.4{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.auth.form-1.0.4-source-release{slingdownload}
+</td></tr>
+<tr><td> Auth OpenID </td><td> 1.0.2 </td><td>
+{slingdownload:jar}org.apache.sling.auth.openid-1.0.2{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.auth.openid-1.0.2-source-release{slingdownload}
+</td></tr>
+<tr><td> Auth Selector </td><td> 1.0.2 </td><td>
+{slingdownload:jar}org.apache.sling.auth.selector-1.0.2{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.auth.selector-1.0.2-source-release{slingdownload}
+</td></tr>
+<tr><td> Bundle Resource Provider </td><td> 2.0.6 </td><td>
+{slingdownload:jar}org.apache.sling.bundleresource.impl-2.0.6{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.bundleresource.impl-2.0.6-source-release{slingdownload}
+</td></tr>
+<tr><td> Commons Classloader </td><td> 1.2.4 </td><td>
+{slingdownload:jar}org.apache.sling.commons.classloader-1.2.4{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.commons.classloader-1.2.4-source-release{slingdownload}
+</td></tr>
+<tr><td> Commons Compiler </td><td> 2.0.2 </td><td>
+{slingdownload:jar}org.apache.sling.commons.compiler-2.0.2{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.commons.compiler-2.0.2-project{slingdownload}
+</td></tr>
+<tr><td> Commons Log </td><td> 3.0.0 </td><td>
+{slingdownload:jar}org.apache.sling.commons.log-3.0.0{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.commons.log-3.0.0-project{slingdownload}
+</td></tr>
+<tr><td> Commons Log Service </td><td> 1.0.0 </td><td>
+{slingdownload:jar}org.apache.sling.commons.logservice-1.0.0{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.commons.logservice-1.0.0-project{slingdownload}
+</td></tr>
+<tr><td> Commons HTML </td><td> 1.0.0 </td><td>
+{slingdownload:jar}org.apache.sling.commons.html-1.0.0{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.commons.html-1.0.0-project{slingdownload}
+</td></tr>
+<tr><td> Commons JSON </td><td> 2.0.6 </td><td>
+{slingdownload:jar}org.apache.sling.commons.html-2.0.6{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.commons.html-2.0.6-project{slingdownload}
+</td></tr>
+<tr><td> Commons OSGi </td><td> 2.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.commons.osgi-2.1.0{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.commons.osgi-2.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Commons Scheduler </td><td> 2.3.4 </td><td>
+{slingdownload:jar}org.apache.sling.commons.scheduler-2.3.4{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.commons.scheduler-2.3.4-source-release{slingdownload}
+</td></tr>
+<tr><td> Commons Testing </td><td> 2.0.10 </td><td>
+{slingdownload:jar}org.apache.sling.commons.testing-2.0.10{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.commons.testing-2.0.10-source-release{slingdownload}
+</td></tr>
+<tr><td> Commons Threads </td><td> 3.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.commons.threads-3.1.0{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.commons.threads-3.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Engine </td><td> 2.2.4 </td><td>
+{slingdownload:jar}org.apache.sling.engine-2.2.4{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.engine-2.2.4-source-release{slingdownload}
+</td></tr>
+<tr><td> Event </td><td> 3.1.2 </td><td>
+{slingdownload:jar}org.apache.sling.event-3.1.2{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.event-3.1.2-source-release{slingdownload}
+</td></tr>
+<tr><td> Explorer </td><td> 1.0.2 </td><td>
+{slingdownload:jar}org.apache.sling.extensions.explorer-1.0.2{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.extensions.explorer-1.0.2-source-release{slingdownload}
+</td></tr>
+<tr><td> Failing Server-Side Tests </td><td> 1.0.6 </td><td>
+{slingdownload:jar}org.apache.sling.testing.samples.failingtests-1.0.6{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.testing.samples.failingtests-1.0.6-source-release{slingdownload}
+</td></tr>
+<tr><td> FileSystem Provider </td><td> 1.0.2 </td><td>
+{slingdownload:jar}org.apache.sling.fsresource-1.0.2{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.fsresource-1.0.2-source-release{slingdownload}
+</td></tr>
+<tr><td> GWT Integration </td><td> 3.0.0 </td><td>
+{slingdownload:jar}org.apache.sling.gwt.servlet-3.0.0{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.gwt.servlet-3.0.0-source-release{slingdownload}
+</td></tr>
+<tr><td> I18n </td><td> 2.2.0 </td><td>
+{slingdownload:jar}org.apache.sling.i18n-2.2.0{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.i18n-2.2.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Installer Core </td><td> 3.3.4 </td><td>
+{slingdownload:jar}org.apache.sling.installer.core-3.3.4{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.installer.core-3.3.4-source-release{slingdownload}
+</td></tr>
+<tr><td> Installer Configuration Support </td><td> 1.0.4 </td><td>
+{slingdownload:jar}org.apache.sling.installer.factory.configuration-1.0.4{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.installer.factory.configuration-1.0.4-source-release{slingdownload}
+</td></tr>
+<tr><td> Installer File Provider </td><td> 1.0.2 </td><td>
+{slingdownload:jar}org.apache.sling.installer.provider.file-1.0.2{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.installer.provider.file-1.0.2-source-release{slingdownload}
+</td></tr>
+<tr><td> Installer JCR Provider </td><td> 3.1.2 </td><td>
+{slingdownload:jar}org.apache.sling.installer.provider.jcr-3.1.2{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.installer.provider.jcr-3.1.2-source-release{slingdownload}
+</td></tr>
+<tr><td> JCR API </td><td> 2.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.api-2.1.0{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.jcr.api-2.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> JCR Base </td><td> 2.1.2 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.base-2.1.2{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.jcr.base-2.1.2-source-release{slingdownload}
+</td></tr>
+<tr><td> JCR ClassLoader </td><td> 3.1.4 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.classloader-3.1.4{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.jcr.classloader-3.1.4-source-release{slingdownload}
+</td></tr>
+<tr><td> JCR ContentLoader </td><td> 2.1.4 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.contentloader-2.1.4{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.jcr.contentloader-2.1.4-source-release{slingdownload}
+</td></tr>
+<tr><td> JCR Compiler </td><td> 2.0.2 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.compiler-2.0.2{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.jcr.compiler-2.0.2-project{slingdownload}
+</td></tr>
+<tr><td> JCR Jackrabbit AccessManager </td><td> 2.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.jackrabbit.accessmanager-2.1.0{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.jcr.jackrabbit.accessmanager-2.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> JCR Jackrabbit Server </td><td> 2.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.jackrabbit.server-2.1.0{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.jcr.jackrabbit.server-2.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> JCR Jackrabbit UserManager </td><td> 2.2.0 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.jackrabbit.usermanager-2.2.0{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.jcr.jackrabbit.usermanager-2.2.0-source-release{slingdownload}
+</td></tr>
+<tr><td> JCR Resource </td><td> 2.0.10 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.resource-2.0.10{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.jcr.resource-2.0.10-project{slingdownload}
+</td></tr>
+<tr><td> JCR Prefs </td><td> 1.0.0 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.prefs-1.0.0{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.jcr.prefs-1.0.0-project{slingdownload}
+</td></tr>
+<tr><td> JCR WebDAV </td><td> 2.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.webdav-2.1.0{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.jcr.webdav-2.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> JCR DavEx </td><td> 2.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.davex-1.0.0{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.jcr.davex-1.0.0-source-release{slingdownload}
+</td></tr>
+<tr><td> JCR Web Console Plugin </td><td> 1.0.0 </td><td>
+{slingdownload:jar}org.apache.sling.jcr.webconsole-1.0.0{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.jcr.webconsole-1.0.0-source-release{slingdownload}
+</td></tr>
+<tr><td> JUnit Core </td><td> 1.0.6 </td><td>
+{slingdownload:jar}org.apache.sling.junit.core-1.0.6{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.junit.core-1.0.6-source-release{slingdownload}
+</td></tr>
+<tr><td> JUnit Remote Tests Runners </td><td> 1.0.6 </td><td>
+{slingdownload:jar}org.apache.sling.junit.remote-1.0.6{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.junit.remote-1.0.6-source-release{slingdownload}
+</td></tr>
+<tr><td> JUnit Scriptable Tests Provider </td><td> 1.0.6 </td><td>
+{slingdownload:jar}org.apache.sling.junit.scriptable-1.0.6{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.junit.scriptable-1.0.6-source-release{slingdownload}
+</td></tr>
+<tr><td> Mime Type Service </td><td> 2.1.4 </td><td>
+{slingdownload:jar}org.apache.sling.commons.mime-2.1.4{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.commons.mime-2.1.4-source-release{slingdownload}
+</td></tr>
+<tr><td> Launchpad API </td><td> 1.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.launchpad.api-1.1.0{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.launchpad.api-1.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Launchpad Base </td><td> 2.3.0 </td><td>
+{slingdownload:jar}org.apache.sling.launchpad.base-2.3.0{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.launchpad.base-2.3.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Launchpad Base - Application Launcher </td><td> 2.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.launchpad.base-2.1.0-app{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.launchpad.base-2.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Launchpad Base - Web Launcher </td><td> 2.1.0 </td><td>
+{slingdownload:war}org.apache.sling.launchpad.base-2.1.0-webapp{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.launchpad.base-2.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Launchpad Content </td><td> 2.0.6 </td><td>
+{slingdownload:war}org.apache.sling.launchpad.content-2.0.6{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.launchpad.content-2.0.6-source-release{slingdownload}
+</td></tr>
+<tr><td> Launchpad Installer </td><td> 1.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.launchpad.installer-1.1.0{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.launchpad.installer-1.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Launchpad Integration Tests </td><td> 1.0.0 </td><td>
+{slingdownload:jar}org.apache.sling.launchpad.integration-tests-1.0.0{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.launchpad.integration-tests-1.0.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Launchpad Testing Services </td><td> 2.0.8 </td><td>
+{slingdownload:jar}org.apache.sling.launchpad.test-services-2.0.8{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.launchpad.test-services-2.0.8-source-release{slingdownload}
+</td></tr>
+<tr><td> Launchpad Testing Services WAR </td><td> 2.0.8 </td><td>
+{slingdownload:war}org.apache.sling.launchpad.test-services-war-2.0.8{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.launchpad.test-services-war-2.0.8-source-release{slingdownload}
+</td></tr>
+<tr><td> Path-based RTP sample </td><td> 2.0.4 </td><td>
+{slingdownload:jar}org.apache.sling.samples.path-based.rtp-2.0.4{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.samples.path-based.rtp-2.0.4-source-release{slingdownload}
+</td></tr>
+<tr><td> Rewriter </td><td> 1.0.2 </td><td>
+{slingdownload:jar}org.apache.sling.rewriter-1.0.2{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.rewriter-1.0.2-source-release{slingdownload}
+</td></tr>
+<tr><td> Sample Integration Tests </td><td> 1.0.6 </td><td>
+{slingdownload:jar}org.apache.sling.testing.samples.integrationtests-1.0.6{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.testing.samples.integrationtests-1.0.6-source-release{slingdownload}
+</td></tr>
+<tr><td> Sample Server-Side Tests </td><td> 1.0.6 </td><td>
+{slingdownload:jar}org.apache.sling.testing.samples.sampletests-1.0.6{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.testing.samples.sampletests-1.0.6-source-release{slingdownload}
+</td></tr>
+<tr><td> Scripting API </td><td> 2.1.4 </td><td>
+{slingdownload:jar}org.apache.sling.scripting.api-2.1.4{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.scripting.api-2.1.4-source-release{slingdownload}
+</td></tr>
+<tr><td> Scripting Core </td><td> 2.0.20 </td><td>
+{slingdownload:jar}org.apache.sling.scripting.core-2.0.20{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.scripting.core-2.0.20-source-release{slingdownload}
+</td></tr>
+<tr><td> Scripting Java </td><td> 2.0.2 </td><td>
+{slingdownload:jar}org.apache.sling.scripting.java-2.0.2{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.scripting.java-2.0.2-project{slingdownload}
+</td></tr>
+<tr><td> Scripting JavaScript </td><td> 2.0.12 </td><td>
+{slingdownload:jar}org.apache.sling.scripting.javascript-2.0.12{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.scripting.javascript-2.0.12-project{slingdownload}
+</td></tr>
+<tr><td> Scripting JSP </td><td> 2.0.20 </td><td>
+{slingdownload:jar}org.apache.sling.scripting.jsp-2.0.20{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.scripting.jsp-2.0.20-project{slingdownload}
+</td></tr>
+<tr><td> Scripting JSP Taglib </td><td> 2.1.6 </td><td>
+{slingdownload:jar}org.apache.sling.scripting.jsp.taglib-2.1.6{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.scripting.jsp.taglib-2.1.6-project{slingdownload}
+</td></tr>
+<tr><td> Scripting JST </td><td> 2.0.4 </td><td>
+{slingdownload:jar}org.apache.sling.scripting.jst-2.0.4{slingdownload} </td><td>
+{slingdownload:bin}org.apache.sling.scripting.jst-2.0.4-project{slingdownload}
+</td></tr>
+<tr><td> Security </td><td> 1.0.0 </td><td>
+{slingdownload:jar}org.apache.sling.security-1.0.0{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.security-1.0.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Servlets Get </td><td> 2.1.2 </td><td>
+{slingdownload:jar}org.apache.sling.servlets.get-2.1.2{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.servlets.get-2.1.2-source-release{slingdownload}
+</td></tr>
+<tr><td> Servlets Post </td><td> 2.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.servlets.post-2.1.0{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.servlets.post-2.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Servlets Resolver </td><td> 2.1.2 </td><td>
+{slingdownload:jar}org.apache.sling.servlets.resolver-2.1.2{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.servlets.resolver-2.1.2-source-release{slingdownload}
+</td></tr>
+<tr><td> Settings </td><td> 1.1.0 </td><td>
+{slingdownload:jar}org.apache.sling.settings-1.1.0{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.settings-1.1.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Test Tools </td><td> 1.0.2 </td><td>
+{slingdownload:jar}org.apache.sling.testing.tools-1.0.2{slingdownload} </td><td>
+{slingdownload:zip}org.apache.sling.testing.tools-1.0.2-source-release{slingdownload}
+</td></tr>
+<tr><td> Thread Dumper </td><td> 0.2.2 </td><td>
+{slingdownload:jar}org.apache.sling.extensions.threaddump-0.2.2{slingdownload}
+</td><td>
+{slingdownload:bin}org.apache.sling.extensions.threaddump-0.2.2-source-release{slingdownload}
+</td></tr>
+<tr><td> Web Console Branding </td><td> 1.0.0 </td><td>
+{slingdownload:jar}org.apache.sling.extensions.webconsolebranding-1.0.0{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.extensions.webconsolebranding-1.0.0-source-release{slingdownload}
+</td></tr>
+<tr><td> Web Console Security Provider </td><td> 1.0.0 </td><td>
+{slingdownload:jar}org.apache.sling.extensions.webconsolesecurityprovider-1.0.0{slingdownload}
+</td><td>
+{slingdownload:zip}org.apache.sling.extensions.webconsolesecurityprovider-1.0.0-source-release{slingdownload}
+</td></tr>
+      </div>
+    </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>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/embedding-sling.html
==============================================================================
--- websites/staging/sling/trunk/content/embedding-sling.html (added)
+++ websites/staging/sling/trunk/content/embedding-sling.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,317 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Embedding Sling</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Embedding Sling</h1>
+      <div>
+	    <p><a name="EmbeddingSling-EmbeddingSling"></a></p>
+<h1 id="embedding-sling">Embedding Sling</h1>
+<p>The Sling Launchpad Launcher can be used to embed the OSGi Framework
+startup in your own Java application. This functionality is implemented in
+the <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/base">Sling Launchpad Base project</a>
+. This project has the following features:</p>
+<ul>
+<li>Builds three artifacts:
+<strong> A standalone Java Application with the artifact qualifier <em>app</em>; e.g.
+<em>org.apache.sling.launchpad.base-2.3.1-SNAPSHOT-app.jar</em></strong> A Web Application with the artifact qualifier <em>webapp</em>; e.g
+<em>org.apache.sling.launchpad.base-2.3.1-SNAPSHOT-wepabb.war</em>
+<em><em> The primary artifact without an artifact qualifier; e.g.
+</em>org.apache.sling.launchpad.base-2.3.1-SNAPSHOT.jar</em></li>
+<li>Embeds the OSGi Framework (Apache Felix) in the primary artifact</li>
+<li>Encapsulates the OSGi Framework in its own <em>URLClassLoader</em></li>
+<li>Supports Framework restart</li>
+<li>Allows propagation of core setup functionality depending on the
+environment</li>
+</ul>
+<p>This page is about the internal details of the Sling Launchpad Base module.
+To get an outside overview of the Sling Launchpad you might want to refer
+to <a href="the-sling-launchpad.html">The Sling Launchpad</a>
+ page.</p>
+<p><a name="EmbeddingSling-Structure"></a></p>
+<h1 id="structure">Structure</h1>
+<p>The Launcher is based on three parts:
+1. The external part which is for example the standalone Java application's
+main class or the servlet deployed into the servlet container
+1. The internal part which is the OSGi framework plus helper classes to
+control the framework and run initial installations
+1. The bridging part, which contains API common to the external and internal
+part.</p>
+<p>The external part uses the bridging part to create the class loader into
+which the internal part is loaded. The bidirectional communication between
+the external and internal part is implement based on two interfaces:</p>
+<ul>
+<li>The <em>Launcher</em> interface is implemented by a class in the internal part
+which is loaded through the bridge class loader. This interface allows
+setting, starting and stopping of the framework.</li>
+<li>The <em>Notifiable</em> interface is implemented by a class in the external
+part which instance is handed to the <em>Launcher</em> instance. This interface
+allows the internal part to communicate back to the external part, most
+notably to indicate that the framework has been stopped from within or that
+the framework has been updated and must be restarted.</li>
+</ul>
+<p><a name="EmbeddingSling-TheBridgingPart"></a></p>
+<h1 id="the-bridging-part">The Bridging Part</h1>
+<p>The bridging part is provided in the
+<em>org.apache.sling.launchpad.base.shared</em> package:</p>
+<table>
+<tr><td> Class </td><td> Description </td></tr>
+<tr><td> Launcher </td><td> The interface implemented by the internal class matching the
+external class being called to start/stop the framework. </td></tr>
+<tr><td> LauncherClassLoader </td><td> *URLClassLoader* implementing the class loader to
+load the internal part (along with the OSGi framework). This class loader
+only delegates to the parent class loader any packages not contained in the
+launchpad library (primary artifact of the Launchpad Base project). </td></tr>
+<tr><td> Loader </td><td> Helper class to find the launchpad library and to create the
+*LauncherClassLoader* with that library. This class is also used to
+actually load the *Launcher* implementation to be called from the
+external launcher class. </td></tr>
+<tr><td> Notifiable </td><td> The interface implemented in the external part and handed
+over to the internal part. </td></tr>
+<tr><td> SharedConstants </td><td> Constants naming various properties and classes. </td></tr>
+</table>
+
+<p><a name="EmbeddingSling-TheInternalPart"></a></p>
+<h1 id="the-internal-part">The Internal Part</h1>
+<p>The main class from the internal class directly used is <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/Sling.java"><em>Sling</em></a>
+ which instantiated to start the OSGi Framework. This class is responsible
+for setting up the environment to finally start the OSGi Framework:</p>
+<ul>
+<li>Read the <em>sling.properties</em> file</li>
+<li>Ensure the presence of the JMX MBeanServer service</li>
+<li>Execute the bootstrap installations, updates and uninstallations</li>
+</ul>
+<p>The <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/SlingFelix.java"><em>SlingFelix</em></a>
+ class extends the Apache Felix <em>Felix</em> class which is the actual OSGi
+framework implementation. We extend the class to be able to notify the
+<em>Notifiable</em> implementation and update the OSGi framework from within the
+OSGi framework by updating the system bundle.</p>
+<p><a name="EmbeddingSling-TheExternalPart"></a></p>
+<h2 id="the-external-part">The External Part</h2>
+<p>The external part is comprised of a main class started from the environment
+-- main class of the Java applicaction or the servlet deployed in the
+servlet container -- and a corresponding delegate class located inside of
+the launchpad base library. This delegate class is instantiated by the
+<em>Loader</em> loading from the <em>LauncherClassLoader</em>.</p>
+<p><a name="EmbeddingSling-StandaloneJavaApplication"></a></p>
+<h3 id="standalone-java-application">Standalone Java Application</h3>
+<p>The standalone Java Application makes use of three classes:</p>
+<table>
+<tr><td> Class </td><td> Description </td></tr>
+<tr><td> Main </td><td> This is the main class whose *main* method is called by the Java
+VM. This class is itself the *Notifiable* and finds the *sling.home*
+location from the environment (command line parameter, system property, or
+environment variable). </td></tr>
+<tr><td> MainDelegate </td><td> This class is loaded by the *Loader* from the
+*LauncherClassLoader* to actually complete the initial setup before
+creating the *Sling* class to start the framework. </td></tr>
+<tr><td> ControlListener </td><td> This class is used by the *Main* class to open a
+server socket to be able to start and stop Sling as a server. This class
+allows for starting (opening the server socket), status check (connecting
+to the socket asking for status), and shutdown (connecting to the socket
+asking for shutdown). </td></tr>
+</table>
+
+<p>At the moment these classes are not directly suitable to be embedded in an existing application (or custom application launcher framework) unless that embedding prepares command line arguments in a {{String<a href=".html"></a>
+}} and calls the <em>Main.main</em> method. To allow for custom embeddings or
+extensions, the work distriubtions between the three classes should be
+refactored.</p>
+<p><a name="EmbeddingSling-EmbeddingtheStandaloneJavaApplication"></a></p>
+<h3 id="embedding-the-standalone-java-application">Embedding the Standalone Java Application</h3>
+<p>{info}
+This work is being done as part of <a href="https://issues.apache.org/jira/browse/SLING-2225">SLING-2225</a>
+ and will be officially available with the Sling Launchpad Base release
+2.4.0. If you want to use the embedding before the release, you have to
+checkout the source from [SVN|http://svn.apache.org/repos/asf/sling/trunk/launchpad/base]
+ and build yourself.
+{info}</p>
+<p>To embedd the Sling Launcher in an application, the <em>Main</em> class is
+extended from. To manage the launcher, the following API is available:</p>
+<table>
+<tr><th> Method </th><th> Description </th></tr>
+<tr><td> *Main(Map<String, String> properties)* </td><td> Instantiates the Main class
+with the given configuration properties. These are properties which are
+used directly as overwrites to the configurations in the
+*sling.properties* file. There is no more conversion applied. </td></tr>
+<tr><td> *doControlCommand()* </td><td> Before starting the application for the first
+time, this method can be called to handle any control command action. </td></tr>
+<tr><td> *doStart()* </td><td> Starts the Sling Application using the provided
+configuration properties as overwrites. Also these properties (or the
+*sling.home* system property or the *SLING_HOME* environment variable
+are analyzed to get the value for the *sling.home* setting. </td></tr>
+<tr><td> *doStop()* </td><td> Stops the application started by the *doStart()* method.
+</td></tr>
+</table>
+
+<p><a name="EmbeddingSling-ExternalControloftheSlingApplication"></a></p>
+<h4 id="external-control-of-the-sling-application">External Control of the Sling Application</h4>
+<p>By using control actions, the Sling Launcher may open or connect to a
+control port to communicate. The <em>doControlAction()</em> method together with
+the <em>sling.control.action</em> and <em>sling.control.socket</em> properties is
+able to setup this communication.</p>
+<p>The <em>sling.control.socket</em> is either a normal port number, in which case
+the connection is opened on the <em>localhost</em> interface (usually
+127.0.0.1). Otheriwse, it may also be a value of the form <em>host:port</em> where
+<em>host</em> is the name or IP address of the interface to connect to and port is
+the port number. For security reasons it is suggested to not use an
+interface which is available remotely. So the default of <em>localhost</em> is
+usually the best choice.</p>
+<p>The <em>sling.control.action</em> takes either of three values:</p>
+<table>
+<tr><td> *start* </td><td> Starts a server socket as specified by the
+*sling.control.socket* property. If the socket cannot be bound to
+(because the port is in use) an error message is printed. Using the
+*start* action only makes sense when starting the application. </td></tr>
+<tr><td> *stop* </td><td> The *stop* action is used to stop a running application. For
+that a connection is opened to the server running on the socket specified
+by the *sling.control.socket* property. On this connection the server is
+instructed to shut down. After executing the *stop* action, the Java
+application should be terminated. </td></tr>
+<tr><td> *status* </td><td> The *status* action is used to check the status of a
+running application. For that a connection is opened to the server running
+on the socket specified by the *sling.control.socket* property. On this
+connection the server is queried on its status. After executing the
+*stop* action, the Java application should be terminated. </td></tr>
+</table>
+
+<p><a name="EmbeddingSling-ConversionofCommandlineArgumentstoProperties"></a></p>
+<h4 id="conversion-of-commandline-arguments-to-properties">Conversion of Commandline Arguments to Properties</h4>
+<p>When calling the Main class through the JVM startup the {{Main.main(String<a href=".html"></a>
+ args)}} methods is called which reads the command line arguments and
+converts them into a <em>Map<String, String></em> suitable for the constructore
+as follows:</p>
+<table>
+<tr><th> Command Line Argument </th><th> Properties Entry </th></tr>
+<tr><td> start </td><td> sling.control.action = "start" </td></tr>
+<tr><td> status </td><td> sling.control.action = "status" </td></tr>
+<tr><td> stop </td><td> sling.control.action = "stop" </td></tr>
+<tr><td> -c slinghome </td><td> sling.home = slinghome </td></tr>
+<tr><td> -l loglevel </td><td> org.apache.sling.commons.log.level = loglevel </td></tr>
+<tr><td> -f logfile </td><td> org.apache.sling.commons.log.file = logfile </td></tr>
+<tr><td> -a address </td><td> This command line argument is not supported yet and thus
+ignored </td></tr>
+<tr><td> -p port </td><td> org.osgi.service.http.port = port </td></tr>
+<tr><td> -j [ host ":" ](-host-":"-.html)
+ port </td><td> sling.control.socket = [ host ":" ]
+ port </td></tr>
+<tr><td> -h </td><td> This command line option is handled directly and not converted into
+the map </td></tr>
+</table>
+
+<p><a name="EmbeddingSling-WebApplication"></a></p>
+<h3 id="web-application">Web Application</h3>
+<p>The web application makes use of 5 classes:</p>
+<table>
+<tr><td> Class </td><td> Description </td></tr>
+<tr><td> SlingServlet </td><td> This is the servlet registered in the *web.xml*
+descriptor and loaded by the servlet container into which Sling is
+deplyoed. This class locates the *sling.home* folder and loads the
+*SlingServletDelagate* to actually launch the framework. </td></tr>
+<tr><td> SlingSessionListener </td><td> This -- somewhat inappropriately named -- class is
+registered as a listener by the Sling *web.xml* descriptor. It is called
+by the servlet container and forwards events to the
+*SlingHttpSessionListenerDelegate* which in turn forwards the events to
+the respective Servlet API listener services registered in the OSGi
+Framework. </td></tr>
+<tr><td> SlingBridge </td><td> Simple extension of the *Sling* class which registers the
+system bundle's *BundleContext* as a servlet context attribute of the
+Sling web application. This allows Servlet Container bridging to properly
+work. </td></tr>
+<tr><td> SlingHttpSessionListenerDelegate </td><td> This class is loaded by the
+*LauncherClassLoader* called from the *SlingSessionListener*. It is
+called by the *SlingSessionListener* to forward servlet container events
+to registered Servlet API listener services. </td></tr>
+<tr><td> SlingServletDelegate </td><td> This class is loaded by the *Loader* from the
+*LauncherClassLoader* to actually complete the initial setup before
+creating the *SlingBridge* class to start the framework. </td></tr>
+</table>
+
+<p>At the moment these classes, particularly the <em>SlingServlet</em> class, are
+not particularly well suited to be extended by a servlet slightly modifying
+the launcher.</p>
+      </div>
+    </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>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/errorhandling.html
==============================================================================
--- websites/staging/sling/trunk/content/errorhandling.html (added)
+++ websites/staging/sling/trunk/content/errorhandling.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,171 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Errorhandling</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Errorhandling</h1>
+      <div>
+	    <p><a name="Errorhandling-HandlingErrors"></a></p>
+<h1 id="handling-errors">Handling Errors</h1>
+<p>The Sling Engine includes support for handling uncaught <em>Throwable</em> as
+well as rendering custom HTTP status code pages. This is implemented by
+expecting a (single) <em>org.apache.sling.engine.servlets.ErrorHandler</em>
+service to which handling of uncaught <em>Throwable</em> and HTTP status
+responses are delegated.</p>
+<p>The Sling Servlet Resolver bundle implements this interface by providing an
+elaborate mechanism to find the correct error handling script or servlet
+using the same algorithms as are used to select the scripts or servlets to
+handle regular requests.</p>
+<p>This page provides more information on how error handler scripts are
+selected and what is provided out of the box.</p>
+<p><a name="Errorhandling-HTTPStatusCodes"></a></p>
+<h2 id="http-status-codes">HTTP Status Codes</h2>
+<p>The Sling engine implements the <em>HttpServletResponse.sendError</em> methods
+by calling the {{ErrorHandler.handleError(int status, String message,
+SlingHttpServletRequest request, SlingHttpServletResponse response)}}
+method.</p>
+<p>The Servlet Resolver bundle implementation looks up a script to handle the
+status code as follows:</p>
+<ul>
+<li>The status code is converted to a string and used as the request
+extension. Any request extensions, selectors or suffixes from the actual
+request are ignored.</li>
+<li>The same resource type hierarchy is followed to find the script as for
+regular script resolution. The difference is that for error handler scripts
+<em>sling/servlet/errorhandler</em> is used as the implied base resource type
+(as opposed to <em>sling/servlet/default</em> for regular script resolution.</li>
+</ul>
+<p><em>Examples:</em></p>
+<ul>
+<li>An application provider my provide a default handler for the 404/NOT
+FOUND status. This script might be located in
+<em>/libs/sling/servlet/errorhandler/404.jsp</em>.</li>
+<li>An programmer might provide a handler for the 403/FORBIDDEN status in
+<em>/apps/sling/servlet/errorhandler/403.esp</em>.</li>
+</ul>
+<p><a name="Errorhandling-UncaughtThrowables"></a></p>
+<h2 id="uncaught-throwables">Uncaught Throwables</h2>
+<p>To handle uncaught Throwables the simple name (<em>Class.getSimpleName()</em>)
+of the <em>Throwable</em> class is used as request extension. Similarly to the
+Java try-catch clauses the class hierarchy is supported. That is to handle
+an uncaught <em>FileNotFoundException</em>, the names <em>FileNotFoundException</em>,
+<em>IOException</em>, <em>Exception</em>, <em>Throwable</em> are checked for a Servlet and
+the first one found is then used. Again, the Serlvet may be a Servlet
+registered as an OSGi service or may be a plain script stored in the JCR
+repository or provided through some custom Resource provider.</p>
+<p><em>Example:</em>
+To register a catch-all handler for any uncaught Throwables you might
+create a script <em>/apps/sling/servlet/errorhandler/Throwable.esp</em>.</p>
+<p><em>Note:</em> If no script or servlet to handle an uncaught <em>Throwable</em> is
+registered, the default handler kicks in, which sends back a 500/INTERNAL
+SERVER ERROR response containing the <em>Throwable</em> and the stack trace.
+This response is <em>not</em> handled by the HTTP Status Code handling described
+above because the response status is sent using
+<em>HttpServletResponse.setStatus(int, String)</em>. To prevent this default
+response you have to implement a catch-all handler for the <em>Throwable</em>
+class as shown in the example.</p>
+<p><a name="Errorhandling-DefaultHandler"></a></p>
+<h2 id="default-handler">Default Handler</h2>
+<p>The Sling Servlet Resolver bundle provides a default error handler servlet
+which is used if the algorithms described above do not resolve to a handler
+script or servlet. The provided error handler servlet does the following:</p>
+<ul>
+<li>Print a descriptive message, which is the
+<em>javax.servlet.error.message</em> request attribute by default</li>
+<li>Print a stacktrace if the <em>javax.servlet.error.exception</em> is set</li>
+<li>Dump the request progress tracker</li>
+</ul>
+<p>Starting with Sling Servlet Resolver version 2.0.10 the default error
+handler servlet is looked up using the string <em>default</em> as the request
+extension and the provided default servlet is registered as
+<em><prefix>/sling/servlet/errorhandler/default.servlet</em> where <prefix> is
+the last entry in the resource resolver search path, <em>/libs</em> by default.</p>
+<p>Thus to overwrite the default error handler servlet provide a servlet or
+script for the <em>default</em> extension, for example
+<em>/apps/sling/servlet/errorhandler/default.groovy</em>.</p>
+      </div>
+    </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>
+  </body>
+</html>



Mime
View raw message